Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/app/app-modules/core/services/http-interceptor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ export class HttpInterceptorService implements HttpInterceptor {
catchError((error: HttpErrorResponse) => {
console.error(error);

if (error.status === 401 || error.status === 403) {
Comment thread
snehar-nd marked this conversation as resolved.
this.confirmationService.alert(
"Session expired. Please log in again to continue", 'error'
);
} else this.confirmationService.alert(
error.error.errorMessage || "Something went wrong. Please try again later.",
'error',
);
this.router.navigate(['/login']);
sessionStorage.clear();
localStorage.clear();
this.spinnerService.show();
return throwError(error.error);
}),
Expand Down
4 changes: 3 additions & 1 deletion src/assets/Assamese.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@
"failedStock": "ব্যৰ্থ ষ্টক"

},
"healthId":"হেল্থ আইডি"
"healthId":"হেল্থ আইডি",
"sessionExpiredPleaseLogin": "Session expired. Please log in again to continue",
"somethingWentWrong": "কিছু ভুল হৈছে"
}
}
5 changes: 4 additions & 1 deletion src/assets/English.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@
"drugName": "Drug Name",
"failedStock": "Failed Stock"
},
"healthId":"Health ID"
"healthId":"Health ID",
"sessionExpiredPleaseLogin": "Session expired. Please log in again to continue",
"somethingWentWrong": "Something went wrong"

}
}
4 changes: 3 additions & 1 deletion src/assets/Hindi.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@
"drugName": "दवा का नाम",
"failedStock": "विफल स्टॉक"
},
"healthId": "हेल्थ आईडी"
"healthId": "हेल्थ आईडी",
"sessionExpiredPleaseLogin": "Session expired. Please log in again to continue",
"somethingWentWrong": "कुछ गलत हो गया"
}
}
4 changes: 3 additions & 1 deletion src/assets/Kannada.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@

},
"healthId":"ಆರೋಗ್ಯ ಐಡಿ",
"list": "ಪಟ್ಟಿ"
"list": "ಪಟ್ಟಿ",
"sessionExpiredPleaseLogin": "ಸೆಷನ್ ಅವಧಿ ಮೀರಿದೆ. ಮುಂದುವರಿಸಲು ದಯವಿಟ್ಟು ಮತ್ತೆ ಲಾಗಿನ್ ಮಾಡಿ",
"somethingWentWrong": "ಏನೋ ತಪ್ಪಾಗಿದೆ"
}
}