refactor: improve error message handling

This commit is contained in:
4gray committed 2023-07-01 10:37:29 +02:00
1 parent 42aee71c11
commit de200895e2
1 file changed
+4 -1
+4 -1
View File
@@ -233,11 +233,14 @@ export class AppComponent {
showErrorAsNotification(response: { message: string; status: number }) {
this.snackBar.open(
`Error: ${response.message} (Status: ${response.status})`,
`Error: ${response?.message ?? 'Something went wrong'} (Status: ${
response?.status ?? 0
})`,
null,
{ duration: 4000 }
);
}
/**
* Removes all ipc command listeners on component destroy
*/