mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-14 00:19:16 +01:00
fix: should support 409 responses as well
This commit is contained in:
parent
61c933f982
commit
97decf801a
@ -43,7 +43,7 @@ export function throwIfNotSuccess(response) {
|
||||
return new Promise((resolve, reject) => {
|
||||
response.json().then(body => reject(new ForbiddenError(response.status, body)));
|
||||
});
|
||||
} else if (response.status > 399 && response.status < 404) {
|
||||
} else if (response.status > 399 && response.status < 499) {
|
||||
return new Promise((resolve, reject) => {
|
||||
response.json().then(body => {
|
||||
const errorMsg = body && body.isJoi ? extractJoiMsg(body) : extractLegacyMsg(body);
|
||||
|
Loading…
Reference in New Issue
Block a user