|
|
|
@ -43,10 +43,9 @@ const makeApiCall = async ({ method, url, body, json = true }) => { |
|
|
|
case 400: |
|
|
|
return handleError(`${url}: Bad Request`) |
|
|
|
case 403: |
|
|
|
// reload the page incase the token has expired
|
|
|
|
if (!url.includes("self")) { |
|
|
|
location.reload() |
|
|
|
} |
|
|
|
notificationStore.danger( |
|
|
|
"Your session has expired, or you don't have permission to access that data" |
|
|
|
) |
|
|
|
return handleError(`${url}: Forbidden`) |
|
|
|
default: |
|
|
|
if (response.status >= 200 && response.status < 400) { |
|
|
|
|