mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 09:02:20 +01:00
fix(queues): check response success besides status
This commit is contained in:
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user