fix(ui): 403 clear the token

This commit is contained in:
Shekar Siri 2024-12-02 20:54:23 +01:00
parent 1b564f53d5
commit 00eb4ac872

View file

@ -198,6 +198,11 @@ export default class APIClient {
}
return fetch(edp + _path, init).then((response) => {
if (response.status === 403) {
console.warn('API returned 403. Clearing JWT token.');
this.onUpdateJwt({ jwt: undefined }); // Clear the token
}
if (response.ok) {
return response;
} else {