Return textual error for permissions
This commit is contained in:
1 parent
1d3918db87
commit
2cb5af904e
1 file changed
+4
@@ -26,6 +26,10 @@ export class AuthInterceptor implements HttpInterceptor {
|
|||||||
catchError((error: HttpErrorResponse) => {
|
catchError((error: HttpErrorResponse) => {
|
||||||
if (error.status && error.status == 401) {
|
if (error.status && error.status == 401) {
|
||||||
this.auth.requestAuth();
|
this.auth.requestAuth();
|
||||||
|
return throwError(() => $localize`Authentication required`);
|
||||||
|
}
|
||||||
|
if (error.status && error.status == 403) {
|
||||||
|
return throwError(() => $localize`Permissions too low`);
|
||||||
}
|
}
|
||||||
return throwError(() => error);
|
return throwError(() => error);
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user