Skip to content

Commit

Permalink
fix: added option to prevent error on code >= 400 (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjoma authored Sep 18, 2023
1 parent 2248b1a commit da47e34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ const handleSendRequestMessage = async (config: any) => {
...processedConfig,
cancelToken: cancelSource.token,
responseType: "arraybuffer",
validateStatus: () => true,
})

return <PWChromeMessage<RecvRequestMessageData>>{
Expand All @@ -209,7 +210,7 @@ const handleSendRequestMessage = async (config: any) => {
...processedConfig,

cancelToken: cancelSource.token,

validateStatus: () => true,
transformResponse: [
(data, headers) => {
if (
Expand Down

0 comments on commit da47e34

Please sign in to comment.