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

Commit98bdb6b

Browse files
committed
chore: ui error handling should be specific to general
Specific errors should be checked before defaulting to a generalerror handling
1 parentd0f36dc commit98bdb6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎site/src/api/errors.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ export const getErrorDetail = (error: unknown): string | undefined => {
115115
returnerror.detail;
116116
}
117117

118-
if(errorinstanceofError){
119-
return"Please check the developer console for more details.";
120-
}
121-
122118
if(isApiError(error)){
123119
returnerror.response.data.detail;
124120
}
@@ -127,6 +123,10 @@ export const getErrorDetail = (error: unknown): string | undefined => {
127123
returnerror.detail;
128124
}
129125

126+
if(errorinstanceofError){
127+
return"Please check the developer console for more details.";
128+
}
129+
130130
returnundefined;
131131
};
132132

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp