Skip to content
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

Rework report viewer error handling #1362

Merged
merged 13 commits into from
Nov 28, 2023
Merged

Conversation

Kr0nox
Copy link
Member

@Kr0nox Kr0nox commented Oct 31, 2023

This PR reworks the error handling of the report viewer.

Rewrite Error View:

  • Not takes a more detailed message about the error
  • Can redirect to different pages

Error handling:

  • On Error redirect to Error view which offers to go back to closest possible view
    • Error on Overview => File upload
    • All other views => Back to Overview
    • Errors on the error view get alerted to prevent an infinite error loop
  • Error on File upload page:
    • Get displayed under the upload menu
  • Error on routing:
    • Try to get to Error View
    • If not possible alert error
  • All errors that propagate to the root get alerted

Where we catch errors:

  • On parsing and reading files
  • In the setup function over the build in livecycle hook onErrorCaptured
  • On routing
  • In the root of the App

@Kr0nox Kr0nox changed the title overwork error page Rework report viewer error handling Oct 31, 2023
@Kr0nox Kr0nox added this to the v5.0.0 milestone Oct 31, 2023
…r-handling

# Conflicts:
#	report-viewer/src/views/InformationView.vue
@Kr0nox Kr0nox marked this pull request as ready for review November 21, 2023 16:31
@Kr0nox Kr0nox requested a review from sebinside November 21, 2023 16:31
@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies labels Nov 22, 2023
@sebinside
Copy link
Member

sebinside commented Nov 27, 2023

Funny test case, that completely crashed the report viewer: If you drag a completely unrelated zip (i tested this with a zip containing the JPlag font, don't ask why 😅) this leads to a frozen viewer with the message Loading Files.... The console prompts the error of a missing overview file, but the UI does not reflect this not-to-resolve problem 😁

Edit: Of course, this does not happen in this PR, but in previous versions. Should have mentioned that.

@sebinside
Copy link
Member

Missing error: Arbitrary router errors, e.g., manually navigating to http://localhost:8080/asdf

@sebinside
Copy link
Member

Opening up the report viewer greets me with a red For more details check the console. - Is this intended? If yes, why?

Copy link
Member

@sebinside sebinside left a comment

Choose a reason for hiding this comment

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

Great additions! I only have three minor comments, please see above

Copy link

[JPlag Report Viewer] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Kr0nox
Copy link
Member Author

Kr0nox commented Nov 27, 2023

Missing error: Arbitrary router errors

Should be implemented now

Opening up the report viewer greets me with a red For more details check the console.

This, was due to the FileUploadView#L40 having an == 0 instead of an > 0

Funny test case, that completely crashed the report viewer: If you drag a completely unrelated zip

I could not reproduce it with a zip. Although I could with other file types. It should be fixed now (Errors not shown due to same comparison error as above and not resetting the loadingFiles varriable). Can you confirm that again with you zip? @sebinside

@Kr0nox Kr0nox requested a review from sebinside November 27, 2023 14:31
@Kr0nox Kr0nox merged commit e62c91e into develop Nov 28, 2023
17 checks passed
@Kr0nox Kr0nox deleted the report-viewer/error-handling branch November 28, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants