mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-04 09:06:40 +07:00
removed almost all node sagas
This commit is contained in:
parent
f76a5a4798
commit
168ba8cc04
30 changed files with 268 additions and 448 deletions
src/utils/errors
|
@ -1,9 +1,15 @@
|
|||
const handle = (message: string) => console.warn(message);
|
||||
|
||||
export const showErrorToast = (error: unknown) => {
|
||||
if (typeof error === 'string') {
|
||||
handle(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(error instanceof Error)) {
|
||||
console.warn('catched strange exception', error);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: show toast or something
|
||||
console.warn(error.message);
|
||||
handle(error.message);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue