@ -15,7 +15,9 @@ const apiCall =
if (resp.status === 403) {
removeCookie(Cookies.Auth)
// reload after removing cookie, go to login
location.reload()
if (!url.includes("self")) {
}
return resp
@ -44,7 +44,9 @@ const makeApiCall = async ({ method, url, body, json = true }) => {
return handleError(`${url}: Bad Request`)
case 403:
// reload the page incase the token has expired
return handleError(`${url}: Forbidden`)
default:
if (response.status >= 200 && response.status < 400) {