fix: display an alert on any request error

This used to be the case, but was changed by mistake in the
request refactor (swicht from xhr)
This commit is contained in:
Yohan Boniface 2024-06-14 15:24:01 +02:00
parent 7660153b3b
commit d221a98e78

View file

@ -144,6 +144,8 @@ export class ServerRequest extends Request {
_onNOK(error) { _onNOK(error) {
if (error.status === 403) { if (error.status === 403) {
Alert.error(error.message || translate('Action not allowed :(')) Alert.error(error.message || translate('Action not allowed :('))
} else {
super._onError(error)
} }
return [{}, error.response, error] return [{}, error.response, error]
} }