fix(queues): check response success besides status

This commit is contained in:
2024-02-21 13:52:45 +01:00
parent e738dc8ab5
commit 52b24e6b36

View File

@ -544,7 +544,8 @@
"Content-Type": 'application/json', "Content-Type": 'application/json',
}, },
}).then(response => { }).then(response => {
if (response.status === 200) { // TODO: Communicate failure through HTTP error codes (403) instead of checking response.success.
if (response.status === 200 && response.success) {
return response.json(); return response.json();
} else { } else {
throw response; throw response;