mirror of
https://github.com/google/nomulus.git
synced 2025-08-21 00:34:42 +02:00
Refine error handling in RequestHandler and the console slightly (#2177)
If we don't explicitly handle random unexpected exceptions, the error that the front end receives includes a big ole stacktrace, which is unhelpful for regular users and possibly bad to expose. Instead, we should provide a vague "something went wrong" message. Separately, we can create a default SnackBar options and use that (we want it longer than 1.5 seconds because that's pretty short).
This commit is contained in:
parent
36bd508bf9
commit
a63916b08e
8 changed files with 37 additions and 18 deletions
|
@ -64,9 +64,7 @@ export default class SecurityComponent {
|
|||
this.resetDataSource();
|
||||
},
|
||||
error: (err: HttpErrorResponse) => {
|
||||
this._snackBar.open(err.error, undefined, {
|
||||
duration: 1500,
|
||||
});
|
||||
this._snackBar.open(err.error);
|
||||
},
|
||||
});
|
||||
this.cancel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue