From 21a2632da789fb53af3b98259c559168c852a01f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 22 Jun 2021 12:39:52 +0100 Subject: [PATCH] Adding a page reload when 403 occurs, if token has expired this will return to login page. --- packages/client/src/api/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/api/api.js b/packages/client/src/api/api.js index 8b2328c6a2..e703806345 100644 --- a/packages/client/src/api/api.js +++ b/packages/client/src/api/api.js @@ -43,7 +43,8 @@ const makeApiCall = async ({ method, url, body, json = true }) => { case 400: return handleError(`${url}: Bad Request`) case 403: - notificationStore.danger("Forbidden") + // reload the page incase the token has expired + location.reload() return handleError(`${url}: Forbidden`) default: if (response.status >= 200 && response.status < 400) {