Fixed exeption handling for 403 errors

This commit is contained in:
Lukas Metzger 2018-04-29 19:57:14 +02:00
parent 8db7040211
commit 2df4ce991a

View file

@ -46,7 +46,9 @@ export class HttpService {
headers: this.buildHeaders() headers: this.buildHeaders()
})).data; })).data;
} catch (e) { } catch (e) {
this.handleException(e); if (!await this.handleException(e)) {
throw e;
}
} }
} }
@ -59,7 +61,9 @@ export class HttpService {
headers: this.buildHeaders() headers: this.buildHeaders()
})).data; })).data;
} catch (e) { } catch (e) {
this.handleException(e); if (!await this.handleException(e)) {
throw e;
}
} }
} }
@ -72,7 +76,9 @@ export class HttpService {
headers: this.buildHeaders() headers: this.buildHeaders()
})).data; })).data;
} catch (e) { } catch (e) {
this.handleException(e); if (!await this.handleException(e)) {
throw e;
}
} }
} }
@ -84,7 +90,9 @@ export class HttpService {
headers: this.buildHeaders() headers: this.buildHeaders()
})).data; })).data;
} catch (e) { } catch (e) {
this.handleException(e); if (!await this.handleException(e)) {
throw e;
}
} }
} }
@ -121,8 +129,10 @@ export class HttpService {
this.gs.isLoggedIn = false; this.gs.isLoggedIn = false;
this.router.navigate(['/']); this.router.navigate(['/']);
return true;
} else { } else {
throw e; return false;
} }
} }
} }