fix(dashboard): show internal error in toast message (#2496)
This commit is contained in:
committed by
GitHub
parent
d5337ff5bd
commit
ba73bb4003
5
.changeset/fuzzy-pianos-tap.md
Normal file
5
.changeset/fuzzy-pianos-tap.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@nhost/dashboard': patch
|
||||
---
|
||||
|
||||
fix: update ErrorToast component to show the internal graphql error
|
||||
@@ -46,7 +46,16 @@ export default function ErrorToast({
|
||||
error,
|
||||
};
|
||||
|
||||
const msg = error?.graphQLErrors?.at(0)?.message || errorMessage;
|
||||
const internalError = error?.graphQLErrors?.at(0)?.extensions?.internal as {
|
||||
error: {
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
|
||||
const msg =
|
||||
internalError?.error?.message ||
|
||||
error?.graphQLErrors?.at(0).message ||
|
||||
errorMessage;
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
|
||||
Reference in New Issue
Block a user