Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52eb97f

Browse files
committed
Fix "undefined" in error message
1 parent9a80434 commit52eb97f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎src/commands.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ export class Commands {
5858
returnundefined
5959
})
6060
.catch((err)=>{
61-
letmessage=err
62-
if(axios.isAxiosError(err)&&err.response?.data){
63-
message=err.response.data.detail
64-
}
6561
if(errinstanceofCertificateError){
6662
err.showNotification()
6763

@@ -71,7 +67,10 @@ export class Commands {
7167
}
7268
}
7369
// This could be something like the header command erroring or an
74-
// invalid session token.
70+
// invalid session token. Sometimes it seems the error can be
71+
// undefined, too.
72+
constmessage=
73+
err?.response?.data?.detail||err?.message||err?.response?.status||"no response from the server"
7574
return{
7675
message:"Failed to authenticate: "+message,
7776
severity:vscode.InputBoxValidationSeverity.Error,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp