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

Enriching error messages #2215

Closed
4 tasks done
juankaromo opened this issue Apr 30, 2020 · 2 comments
Closed
4 tasks done

Enriching error messages #2215

juankaromo opened this issue Apr 30, 2020 · 2 comments
Assignees
Labels
type/enhancement Enhancement issue
Projects
Milestone

Comments

@juankaromo
Copy link
Contributor

juankaromo commented Apr 30, 2020

Hi team,

We need to give more information to the user when an error occurs in the app. Right now we report that an error has occurred in a certain module or service, but we don't specify what type of error.

For example, during the health check if there is an error in the API we are simply told that the connection is unreachable, but we are not told why, even though the response to the request gives us the reason. We have to show it.

  • Review errors that appear in health check
  • Review errors that appear in API settings section
  • Review errors that appear in toasts
  • Review errors that appear in file validations

Regards,

@Desvelao
Copy link
Member

Desvelao commented May 14, 2020

Update

  • Services migrated from AngularJS to ReactJS:
    • ErrorHandler
    • CheckDaemonsStatus
  • The references to AngularJS errorHandler service are still in the code.
  • Let through errors when they are strings in healthcheck and app settings sections.
  • Improved some messages.

TODO:

  • remove some console.log found. Pending of accept.
  • remove references AngularJS errorHandler service in controllers. Pending of accept.
  • review error toasts
  • review error in file validations

Strange behavior

A strange behavior has been detected when you wanted to upload a cdb list with the same name as an existing one. The catch block in WzRequest.generiqReq service returns a error.message as Request failed with status code 500 instead the original backend response with Wazuh API error: 1905 - File was not updated because it already exists. It seems that the original response coming in error.response.data. More info about this: axios/axios#960. Same behavior has been experimented in sample data request section.

Screenshot with the problem:
backend-response-app-not-same

After apply the commented fix:
backend-response-app-same-after-commented-fix

@pablotr9
Copy link
Contributor

pablotr9 commented Jun 5, 2020

Update :

Fixed the error message when there is something wrong in the wazuh.yml:

image

image

Fixed the error message when an API connection failed
image


image

@juankaromo juankaromo modified the milestones: Sprint 112, Sprint 113 Jun 15, 2020
@juankaromo juankaromo added this to Done in Wazuh 3.13 via automation Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
No open projects
Wazuh 3.13
  
Done
Development

No branches or pull requests

3 participants