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

fix error message in conf managment and add test #3443

Conversation

eze9252
Copy link
Contributor

@eze9252 eze9252 commented Jul 6, 2021

Hi Team, this resolve:

Change of message when API fails (not because of server problem) or does not bring information of certain configuration.

Tests

  • Review the message in a Wazuh manager configuration for Alerts > Email alerts (It could have more configurations that could be displaying the same message due to the same problem in the API response)

Closes #3340

@Desvelao
Copy link
Member

Desvelao commented Jul 7, 2021

issue: When retrieving some configuration as the emails related, the request to the API endpoint reply with a failed response.
Example of failed request:

Wazuh API Endpoint: /cluster/manager-node/configuration/mail/alerts
Response:

{"statusCode":500,"error":"Internal Server Error","message":"3013 - Error connecting with socket"}

suggestion: Maybe we could manage this specific error and show a more precise message instead of the message changed in the PR: There was a problem while fetching the configuration for this section. It may be a server problem or the configuration doesn't exist. Anyways, the generic suggested solution in the PR looks good too.

@Desvelao Desvelao requested a review from a team July 7, 2021 11:10
@Desvelao Desvelao added the type/enhancement Enhancement issue label Jul 7, 2021
@Desvelao Desvelao linked an issue Jul 7, 2021 that may be closed by this pull request
@Desvelao
Copy link
Member

Desvelao commented Jul 7, 2021

review:
CR ✅
Testing ✅

Screenshots:
image
image

@Desvelao
Copy link
Member

Desvelao commented Jul 7, 2021

@eze9252 add the change to the changelog file

Copy link
Contributor

@pablomarga pablomarga left a comment

Choose a reason for hiding this comment

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

Testing: ✔️
CR: ✔️

@frankeros frankeros merged commit 1749d49 into 4.3-7.10 Jul 21, 2021
@frankeros frankeros deleted the bugfix/3340-interal-server-error-when-fetching-some-information branch July 21, 2021 12:39
@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 3.81% ( 1357 / 35651 )
Branches 1.47% ( 413 / 28100 )
Functions 2.61% ( 225 / 8613 )
Lines 3.85% ( 1312 / 34084 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal server error when fetching some unavailable information
4 participants