fix(user): change username (#1502)

* fix(user): change username

* fix(user): api client error improvements

* fix(user): api client error improvements
This commit is contained in:
ze0s 2024-04-12 15:09:40 +02:00 committed by GitHub
parent da53230077
commit 5857945e71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 14 deletions

View file

@ -52,6 +52,12 @@ export const queryClient = new QueryClient({
},
mutations: {
onError: (error) => {
console.log("mutation error: ", error)
if (error instanceof Response) {
return
}
// Use a format string to convert the error object to a proper string without much hassle.
const message = (
typeof (error) === "object" && typeof ((error as Error).message) ?