Skip to content

Commit

Permalink
fix taitan not returning actual error
Browse files Browse the repository at this point in the history
  • Loading branch information
Herkarl committed Jul 2, 2024
1 parent c8f8db0 commit 61225b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Taitan.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ function taitanFetcher(cacheKey) {
} else if (res.ok) {
return res.json()
} else {
throw new HTTPError(res.status)
return res.text().then((data) => Promise.reject({
code: res.status,
message: data
}))
}
})
.then(res => ({ status: 200, redirect: false, ...res }));
Expand Down

0 comments on commit 61225b2

Please sign in to comment.