diff --git a/src/app/api/authentication.service.ts b/src/app/api/authentication.service.ts index c15c34a..e2b56e8 100644 --- a/src/app/api/authentication.service.ts +++ b/src/app/api/authentication.service.ts @@ -73,11 +73,16 @@ export class AuthenticationService extends ApiImplementation { this.http.post("/refreshToken", request).subscribe({ error: error => { - this.ResetStoredInformation(); const apiError: RefreshApiError | undefined = error.error?.error; - console.warn("API error during token refresh:", apiError); - this.bannerService.warn("Session Expired", "Your session has expired, please sign in again."); + + if (apiError !== undefined && apiError.statusCode == 403) { + this.ResetStoredInformation(); + this.bannerService.warn("Session Expired", "Your session has expired, please sign in again."); + } + else { + this.bannerService.warn("Failed to refresh session", "An unknown error occurred (but you are still signed in): " + (apiError === undefined ? error.message : apiError.message)); + } }, next: response => { this.tokenStorage.SetStoredGameToken(response.tokenData);