mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
refactor: improve error message handling
This commit is contained in:
1 parent
42aee71c11
commit
de200895e2
1 file changed
+4
-1
@@ -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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user