From e29dbf15ab588c1c06b8e99c468ac8da7b629389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cintia=20S=C3=A1nchez=20Garc=C3=ADa?= Date: Fri, 17 May 2024 13:51:56 +0200 Subject: [PATCH] Fix issue handling invalid CSRF token (#3821) Signed-off-by: Cintia Sanchez Garcia --- web/src/api/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/api/index.ts b/web/src/api/index.ts index 7d1b5c8a0..9b146b2d4 100644 --- a/web/src/api/index.ts +++ b/web/src/api/index.ts @@ -299,7 +299,7 @@ class API_CLASS { const options: FetchOptions | any = await this.processFetchOptions(props.opts); return fetch(props.url, options) - .then(this.handleErrors) + .then((res) => this.handleErrors(res)) .then((res) => this.handleContent(res, props.skipCamelConversion, props.checkApprovedSession, props.headers)) .catch((error) => Promise.reject(error)); });