Skip to content

Commit

Permalink
fix(): accept wider http success code range
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagosiebler committed Sep 13, 2024
1 parent 104978c commit bb40bd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/BaseRestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export abstract class BaseRestClient {
// Dispatch request
return axios(options)
.then((response) => {
if (response.status == 200) {
if (response.status >= 200 && response.status <= 204) {
// Throw if API returns an error (e.g. insufficient balance)
if (
typeof response.data?.code === 'string' &&
Expand Down

0 comments on commit bb40bd7

Please sign in to comment.