mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
feat: ✨ Add error notification for all errors
This commit is contained in:
parent
f9433e259b
commit
2b14813555
|
|
@ -13,6 +13,15 @@ export const useClient = (
|
|||
toValue(customToken)?.access_token ??
|
||||
identity.value?.tokens.access_token ??
|
||||
undefined,
|
||||
(error) => {
|
||||
useEvent("notification:new", {
|
||||
title: "An error occured",
|
||||
type: "error",
|
||||
message:
|
||||
error.response.data.error ??
|
||||
"No error message provided",
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
};
|
||||
Loading…
Reference in a new issue