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

NAS-128858 / 24.10 / Fix & improve http error handler #10300

Merged
merged 4 commits into from
Jul 15, 2024
Merged

Conversation

bvasilenko
Copy link
Contributor

Summary

This PR contains 2 changes:

  1. The error modal window depicted in the ticket (Error(0)) was shown due to the fact that the handler received not an HTTP error, but a Job error from the websocket. I've fixed this handler.

  2. Adjust HTTP error handler to show error title and message from HTTP errors, which was preventing from determining the root cause of the issue

Testing

On any box, for example on http://10.220.16.103

  1. When user clicks Data Protection > Cloud Sync Tasks > Green "Success" Pill

  2. At the error modal window, user clicks Download Logs

    • Important: you will need to adjust the code to simulate downloading HTTP error, similar to one shown below

@bvasilenko bvasilenko requested a review from a team as a code owner July 8, 2024 19:38
@bvasilenko bvasilenko requested review from AlexKarpov98 and removed request for a team July 8, 2024 19:38
@bugclerk
Copy link
Contributor

bugclerk commented Jul 8, 2024

@bugclerk bugclerk changed the title NAS-128858: Fix & improve http error handler NAS-128858 / 24.10 / Fix & improve http error handler Jul 8, 2024
@undsoft undsoft self-requested a review July 11, 2024 08:22
Copy link
Collaborator

@undsoft undsoft left a comment

Choose a reason for hiding this comment

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

Changes look reasonable, thanks.

@bvasilenko bvasilenko enabled auto-merge (squash) July 11, 2024 19:21
Copy link

codecov bot commented Jul 14, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.71%. Comparing base (2bcff3a) to head (e71765d).

Files Patch % Lines
src/app/services/error-handler.service.ts 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10300      +/-   ##
==========================================
+ Coverage   76.70%   76.71%   +0.01%     
==========================================
  Files        1594     1594              
  Lines       54835    54839       +4     
  Branches     6477     6479       +2     
==========================================
+ Hits        42059    42072      +13     
+ Misses      12776    12767       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bvasilenko bvasilenko merged commit d6984a4 into master Jul 15, 2024
10 checks passed
@bvasilenko bvasilenko deleted the NAS-128858 branch July 15, 2024 21:35
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants