mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 21:42:20 +01:00
fix(queues): check response success besides status
This commit is contained in:
@ -544,7 +544,8 @@
|
||||
"Content-Type": 'application/json',
|
||||
},
|
||||
}).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();
|
||||
} else {
|
||||
throw response;
|
||||
|
||||
Reference in New Issue
Block a user