Skip to content
Snippets Groups Projects
Verified Commit 708f91d1 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #10954 TIME 0:10 remove handle 401 in notification service

parent 2ea567c7
No related branches found
No related tags found
No related merge requests found
...@@ -38,14 +38,11 @@ export class NotificationService { ...@@ -38,14 +38,11 @@ export class NotificationService {
handleErrors(err: any) { handleErrors(err: any) {
console.log(err); console.log(err);
if (err.status === 401 && this.router.url !== '/login') { if (err.status === 0 && err.statusText === 'Unknown Error') {
this.router.navigate(['/login']);
this.error('lang.logAgain');
} else if (err.status === 0 && err.statusText === 'Unknown Error') {
this.error('lang.connectionServerFailed'); this.error('lang.connectionServerFailed');
} else { } else {
if (err.error.errors !== undefined) { if (err.error.errors !== undefined) {
if (typeof err.error.lang !== "undefined") { if (typeof err.error.lang !== undefined) {
this.error('lang.' + err.error.lang); this.error('lang.' + err.error.lang);
} else { } else {
this.error(err.error.errors); this.error(err.error.errors);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment