Skip to content

Commit

Permalink
fix(sendinblue): handle all 2xx codes
Browse files Browse the repository at this point in the history
  • Loading branch information
lutangar committed Sep 12, 2019
1 parent 130d654 commit 74b8237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/sendInBlue/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const call = (path: string, data?: {} | [], method: Method = 'GET') =>
if (response.status >= 400) {
throw new Error('Bad response from server');
}
if (response.status === 204) {
if (response.status >= 200 && response.status < 300) {
return true;
}
return response.json();
Expand Down

0 comments on commit 74b8237

Please sign in to comment.