Fixed exeption handling for 403 errors
This commit is contained in:
parent
8db7040211
commit
2df4ce991a
1 changed files with 15 additions and 5 deletions
|
@ -46,7 +46,9 @@ export class HttpService {
|
|||
headers: this.buildHeaders()
|
||||
})).data;
|
||||
} catch (e) {
|
||||
this.handleException(e);
|
||||
if (!await this.handleException(e)) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +61,9 @@ export class HttpService {
|
|||
headers: this.buildHeaders()
|
||||
})).data;
|
||||
} catch (e) {
|
||||
this.handleException(e);
|
||||
if (!await this.handleException(e)) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +76,9 @@ export class HttpService {
|
|||
headers: this.buildHeaders()
|
||||
})).data;
|
||||
} catch (e) {
|
||||
this.handleException(e);
|
||||
if (!await this.handleException(e)) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +90,9 @@ export class HttpService {
|
|||
headers: this.buildHeaders()
|
||||
})).data;
|
||||
} catch (e) {
|
||||
this.handleException(e);
|
||||
if (!await this.handleException(e)) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,8 +129,10 @@ export class HttpService {
|
|||
this.gs.isLoggedIn = false;
|
||||
|
||||
this.router.navigate(['/']);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
throw e;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue