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

Improve error logging in socketDbWrapper #23075

Merged
merged 7 commits into from
Apr 26, 2024

Conversation

GabrielEValenzuela
Copy link
Member

Related issue
#23064

Objective

This PR addresses the issue of inconsistent and unclear error logging within the socketDbWrapper component of our system. By introducing a standardized method of logging errors and warnings through an enum class and implementing a new custom exception class socketDbWrapperException, we aim to enhance the clarity and trackability of errors, improving system diagnostics and maintenance.

Description

  • Previously, error logging within the socketDbWrapper was inconsistent, with various parts of the codebase using different methods and formats for logging. This inconsistency made troubleshooting and debugging more challenging.
  • To resolve this, we have defined an enum class DbQueryStatus within the socketDbWrapper, which categorizes and standardizes the error codes used throughout the component.
  • Additionally, we have introduced the socketDbWrapperException custom exception class.
  • The integration of these improvements into the socketDbWrapper has been carried out with careful consideration to maintain compatibility with existing error handling mechanisms and to ensure that the new system enhances rather than disrupts current operations.

Quality Assurance

Static Analysis

  • The new error handling and logging code underwent rigorous static analysis to ensure it adheres to coding standards and best practices.

Testing

Unit Testing

N/A

Integration Testing

N/A


@GabrielEValenzuela GabrielEValenzuela self-assigned this Apr 22, 2024
@GabrielEValenzuela GabrielEValenzuela linked an issue Apr 22, 2024 that may be closed by this pull request
@GabrielEValenzuela GabrielEValenzuela changed the title CL: Improve error logging in socketDbWrapper Apr 22, 2024
@GabrielEValenzuela GabrielEValenzuela marked this pull request as ready for review April 23, 2024 12:31
Copy link
Member

@sebasfalcone sebasfalcone left a comment

Choose a reason for hiding this comment

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

Some changes related to the log format

sebasfalcone
sebasfalcone previously approved these changes Apr 24, 2024
Copy link
Member

@Dwordcito Dwordcito left a comment

Choose a reason for hiding this comment

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

Only change the level of the verbosity for those messages.

- Add custom exception.

- Enum possible errors.

- Difference error from warning.
- Apply review comments.
- Add try/catch for packages
- Add review comments.
- Fix review comments.
- Remove catch for SocketDbWrapperException
- Fix error.
@Dwordcito Dwordcito merged commit 755ddbd into 4.8.0 Apr 26, 2024
86 of 87 checks passed
@Dwordcito Dwordcito deleted the bug/23064-improve-loggin-socketdbwrapper branch April 26, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vulnerability Scanner error handling request
3 participants