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
20 changes: 20 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 @@ -76,6 +76,26 @@ export class HttpInterceptorService implements HttpInterceptor {
catchError((error: HttpErrorResponse) => {
console.error(error);
this.spinnerService.setLoading(false);
if (error.status === 401) {
this.handleSessionExpiry(
this.currentLanguageSet.sessionExpiredPleaseLogin,
);
} else if (error.status === 403) {
this.confirmationService.alert(
this.currentLanguageSet.accessDenied,
'error',
);
} else if (error.status === 500) {
this.confirmationService.alert(
this.currentLanguageSet.internaleServerError,
'error',
);
} else {
this.confirmationService.alert(
error.message || this.currentLanguageSet.somethingWentWrong,
'error',
);
}
return throwError(error.error);
}),
);
Expand Down
5 changes: 4 additions & 1 deletion src/assets/English.json
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,10 @@
"abhaNumberAlreadyWith": "The Abha number is already linked with beneficiary ID - ",
"issueInFetchinglinkedBeneficiaryId": "Issue in fetching Beneficiary Id linked to ABHA ID",
"sessionExpiredPleaseLogin": "Session expired. Please log in again to continue",
"continueButton": "Continue"
"continueButton": "Continue",
"accessDenied": "Access Denied",
"internaleServerError": "Internal Server Error",
"somethingWentWrong": "Something went wrong"
}


Expand Down
5 changes: 4 additions & 1 deletion src/assets/Hindi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,9 @@
"abhaNumberAlreadyWith": "The Abha number is already linked with beneficiary ID - ",
"issueInFetchinglinkedBeneficiaryId": "Issue in fetching Beneficiary Id linked to ABHA ID",
"sessionExpiredPleaseLogin": "Session expired. Please log in again to continue",
"continueButton": "जारी रखें"
"continueButton": "जारी रखें",
"accessDenied": "पहुँच अस्वीकृत",
"internaleServerError": "आंतरिक सर्वर त्रुटि",
"somethingWentWrong": "कुछ गलत हो गया"
}
}
5 changes: 4 additions & 1 deletion src/assets/Kannada.json
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,10 @@
"abhaNumberAlreadyWith": "The Abha number is already linked with beneficiary ID - ",
"issueInFetchinglinkedBeneficiaryId": "Issue in fetching Beneficiary Id linked to ABHA ID",
"sessionExpiredPleaseLogin": "Session expired. Please log in again to continue",
"continueButton": "ಮುಂದುವರಿಸಿ"
"continueButton": "ಮುಂದುವರಿಸಿ",
"accessDenied": "ಪ್ರವೇಶ ನಿರಾಕರಿಸಲಾಗಿದೆ",
"internaleServerError": "ಆಂತರಿಕ ಸರ್ವರ್ ದೋಷ",
"somethingWentWrong": "ಏನೋ ತಪ್ಪಾಗಿದೆ"

}

Expand Down