Skip to content

Commit

Permalink
Merge pull request #20 from tiagosiebler/errocode
Browse files Browse the repository at this point in the history
fix(): accept wider http success code range
  • Loading branch information
tiagosiebler authored Sep 13, 2024
2 parents 104978c + bb40bd7 commit c43b6cb
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 c43b6cb

Please sign in to comment.