Skip to content

Commit

Permalink
fix: fix the issues with the request.js (#4667)
Browse files Browse the repository at this point in the history
  • Loading branch information
swamp-y committed Oct 17, 2024
1 parent c432e0a commit 773e5f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/web-antd/src/api/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function createRequestClient(baseURL: string) {
if (status >= 200 && status < 400 && code === 0) {
return data;
}
throw new Error(`Error ${status}: ${msg}`);
throw { response };

Check failure on line 81 in apps/web-antd/src/api/request.ts

View workflow job for this annotation

GitHub Actions / Lint (ubuntu-latest)

Expected an error object to be thrown
},
});

Expand Down
2 changes: 1 addition & 1 deletion playground/src/api/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function createRequestClient(baseURL: string) {
if (status >= 200 && status < 400 && code === 0) {
return data;
}
throw new Error(`Error ${status}: ${msg}`);
throw { response };

Check failure on line 82 in playground/src/api/request.ts

View workflow job for this annotation

GitHub Actions / Lint (ubuntu-latest)

Expected an error object to be thrown
},
});

Expand Down

0 comments on commit 773e5f7

Please sign in to comment.