Skip to content

feat: Make it easier to see the relevant part of InternalServerError - #12402

Merged
joheriks merged 6 commits into
masterfrom
tarek-patch-2
Nov 26, 2021
Merged

joheriks merged 6 commits into
masterfrom
tarek-patch-2

Conversation

@tarekoraby

Copy link
Copy Markdown
Contributor

Fixes #9493

@tarekoraby
tarekoraby requested a review from joheriks November 19, 2021 12:21

@joheriks joheriks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the message addition "with the root cause" could we also have an explicit mention in the same string that the full stack trace can be seen in the server log. After this the code also need to be formatted correctly (run mvn formatter:format in the flow project).

@tarekoraby

Copy link
Copy Markdown
Contributor Author

Actually, the full exception will continue to be printed under this h3 element. So then we will have to say something like "see full stack trace below or in the server logs".
I slightly prefer not to add this extra note as I feel that the stack trace will not be missed (but I have no super-strong objections if you insist on adding it).

@joheriks

joheriks commented Nov 24, 2021 •

Copy link
Copy Markdown
Contributor

Actually, the full exception will continue to be printed under this h3 element. So then we will have to say something like "see full stack trace below or in the server logs". I slightly prefer not to add this extra note as I feel that the stack trace will not be missed (but I have no super-strong objections if you insist on adding it).

My main worry was that the beginning of the <pre> element could be misunderstood as being the stack trace of the root cause (tempting to copy-paste the <h3> line + only the first stack trace believing this to be the root cause into a ticket / chat) without some clear identification what is what. But on second thought the <h3> plus the gray background of the section serves to delineate them sufficiently, so I would be okay with this.

Screenshot 2021-11-24 at 15 57 57

(As a separate ticket/PR, a further DX improvement would be to make the stack trace easily copyable via the lower right-hand gizmo). The formatting should get fixed though.

@tarekoraby tarekoraby changed the title Make it easier to see the relevant part of InternalServerError feat: Make it easier to see the relevant part of InternalServerError Nov 25, 2021
@vaadin-bot

Copy link
Copy Markdown
Collaborator

SonarQube analysis reported 3 issues

  1. MAJOR InternalServerError.java#L70: A "NullPointerException" could be thrown; "parameter" is nullable here. rule
  2. MAJOR InternalServerError.java#L70: Possible null pointer dereference of parameter in com.vaadin.flow.router.InternalServerError.setErrorParameter(BeforeEnterEvent, ErrorParameter) rule
  3. MAJOR InternalServerError.java#L162: A "NullPointerException" could be thrown; "rootCause" is nullable here. rule

@joheriks
joheriks merged commit 504c5e2 into master Nov 26, 2021
@joheriks
joheriks deleted the tarek-patch-2 branch November 26, 2021 14:39
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with platform 23.0.0.alpha1 and is also targeting the upcoming stable 23.0.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it easier to see the relevant part of a navigation error

4 participants