1
0
Fork 0
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:
Fedor Katurov 2022-01-02 20:44:41 +07:00
parent f76a5a4798
commit 168ba8cc04
30 changed files with 268 additions and 448 deletions
src/utils/errors

View file

@ -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);
};