Refactor auth module.
- Switch from form to text field for passphrase input. - Refactor error dialog format. - Send dialog on incorrect parsing of private key. - Refactor block sync service to take parameters.
This commit is contained in:
@@ -16,16 +16,13 @@ export class ErrorInterceptor implements HttpInterceptor {
|
||||
|
||||
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
|
||||
return next.handle(request).pipe(catchError((err: HttpErrorResponse) => {
|
||||
const data = {
|
||||
this.errorDialogService.openDialog({
|
||||
message: err.error.message || err.statusText,
|
||||
reason: err && err.error && err.error.reason ? err.error.reason : '',
|
||||
status: err.status
|
||||
};
|
||||
this.errorDialogService.openDialog(data);
|
||||
});
|
||||
if ([401, 403].indexOf(err.status) !== -1) {
|
||||
location.reload(true);
|
||||
}
|
||||
// const error = err.error.message || err.statusText;
|
||||
return throwError(err);
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user