Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyballentine committed Jun 30, 2024
1 parent d4a1f12 commit b48320a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/common/Backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,12 @@ export class Backend {
if (ServerError.isJson(responseData)) {
throw ServerError.fromJson(responseData);
}
if (ServerError.isJson(responseData)) {
throw ServerError.fromJson(responseData);
if (error.response?.data) {
return error.response.data as T;
}
if (axios.isCancel(error)) {
return {} as T;
}
if (error.response?.data) {
return error.response.data as T;
}
}
if (ServerError.isJson(error)) {
throw ServerError.fromJson(error);
Expand Down

0 comments on commit b48320a

Please sign in to comment.