New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2856 Improve ContextError display in Page Editor output panel #2860
Conversation
710bdcd
to
f5513cf
Compare
a407006
to
f7f542c
Compare
return <NetworkErrorDetail error={rootCause.error} />; | ||
} | ||
|
||
return entry.error.stack; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the stack trace for unknown errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only people who would understand the stack trace are probably capable of finding the stack trace in the browser console, right? Maybe we could show the first line of the stack trace or something? I'm just not sure when this would be useful to most page editor users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I don't think that the first line will be of any help.
Agree with the rest of your comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so should we remove this and just return a generic "unknown error occurred, please try again" type of message instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stack trace is removed, in case of "unknown" error it will show the name and message, see https://github.com/pixiebrix/pixiebrix-extension/pull/2860/files#diff-c412177eff772c4bca878f3bc805c720cbd34904f49e54cae4c8bc21fb850a5cR72
Closes #2856
ErrorDetails components are reused. The logic in
ErrorDisplay
is very similar toEntryRow
and can be moved to a helper/utility function.InputValidationError:
ClientNetworkError:
Template error (or any other error with the
name
property):Logs tab:
TODO:
ErrorDisplay
andEntryRow