Skip to content

Commit

Permalink
fix(): response code 201 should not throw
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagosiebler committed Jun 3, 2024
1 parent e1d239c commit 77527e6
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 @@ -244,7 +244,7 @@ export abstract class BaseRestClient {
// Dispatch request
return axios(options)
.then((response) => {
if (response.status == 200) {
if (response.status == 200 || response.status == 201) {
// Throw API rejections by parsing the response code from the body
if (
typeof response.data?.code === 'number' &&
Expand Down

0 comments on commit 77527e6

Please sign in to comment.