-
Notifications
You must be signed in to change notification settings - Fork 53
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
Status.tsx: show as many different error types as possible (HMS-1442) #2066
Status.tsx: show as many different error types as possible (HMS-1442) #2066
Conversation
7cc041f
to
7a2eb9d
Compare
6728984
to
dec120d
Compare
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.
Amazing! thank you
if (error.details?.reason) { | ||
detailsArray.push(`${error.details.reason}`); | ||
} | ||
if (error.details?.s) { |
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.
Huh what's the s
field?
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.
Update from our chats aside this issue:
It seems to stem from my confusion from the golang error type having the error in .s
but this seems to never land in the frontend anyway due to
https://github.com/golang/go/blob/1843464f014c946c1663de76249267486887626f/src/builtin/builtin.go#L309
not being able to serialize …
I'll remove from the frontend...
<div className="pf-v5-c-code-block__content"> | ||
<pre className="pf-v5-c-code-block__pre"> | ||
{detailsArray.join('\n')} | ||
<code className="pf-v5-c-code-block__code"></code> |
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.
Not sure about using code blocks here, the result doesn't work well for more common errors:
target errors:
We can maybe make the popover wider, and then have reason and details just separated by a vertical line or something? Maybe just details in a codeblock?
If we can somehow tell when it's a stacktrace, putting that in a codeblock could be nice.
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.
totally agree - that's actually for someone else to decide - I'm far away from being a react, PatternFly or design expert!
Hey, I like that we have the english error terminology separated from the code itself. I think it looks great! |
4d0ab42
to
3528e62
Compare
@lucasgarfield what are your suggestions for visual improvements? |
3528e62
to
d9ad410
Compare
f9b45f2
to
b9a3487
Compare
/retest |
b9a3487
to
7be1da0
Compare
/retest |
1 similar comment
/retest |
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.
Looks great, thank you!
As far as I saw
error.details
rarely contains a.reason
again.It's sometimes directly a string and maybe there is
error.details.s
or it's even a list of stringsI'm really not sure if this is the right place to handle this but the
error.details
are somehow support to contain "arbitrary" stuff... (For this uncertainty it's a draft for now)Also
\n
does not seem to work with react and<p>
so I needed thismap()