From d221a98e7899f604cd9e282905f9049be28c3e25 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 14 Jun 2024 15:24:01 +0200 Subject: [PATCH] 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) --- umap/static/umap/js/modules/request.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umap/static/umap/js/modules/request.js b/umap/static/umap/js/modules/request.js index 07d10cca..3edc6ba8 100644 --- a/umap/static/umap/js/modules/request.js +++ b/umap/static/umap/js/modules/request.js @@ -144,6 +144,8 @@ export class ServerRequest extends Request { _onNOK(error) { if (error.status === 403) { Alert.error(error.message || translate('Action not allowed :(')) + } else { + super._onError(error) } return [{}, error.response, error] }