File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/shared/src/request Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,11 @@ axios.interceptors.response.use(
211211
212212 return fallbackResponse ;
213213 } catch ( fallbackError ) {
214+ // If fallback error is a OneKeyServerApiError (business error), throw it directly
215+ if ( fallbackError instanceof OneKeyServerApiError ) {
216+ throw fallbackError ;
217+ }
218+
214219 // If fallback also fails, continue with original error handling
215220 console . warn (
216221 'Business error fallback request also failed:' ,
@@ -350,6 +355,11 @@ axios.interceptors.response.use(
350355
351356 return fallbackResponse ;
352357 } catch ( fallbackError ) {
358+ // If fallback error is a OneKeyServerApiError (business error), throw it directly
359+ if ( fallbackError instanceof OneKeyServerApiError ) {
360+ throw fallbackError ;
361+ }
362+
353363 // If fallback also fails, continue with original error handling
354364 console . warn ( 'Fallback request also failed:' , fallbackError ) ;
355365 }
You can’t perform that action at this time.
0 commit comments