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 logging and throwing error as it is an anti pattern #6272

Conversation

sadilchamishka
Copy link
Contributor

@sadilchamishka sadilchamishka commented Jan 7, 2025

Proposed changes in this pull request

$subject

The "log and throw" anti-pattern occurs when an exception is logged and then re-thrown, leading to duplicate log entries.

Logging an additional detail is fine as it will not be a redundant information. Hence a warning log is added to notify the outbound provisioning failure.

Related issues

Copy link

sonarqubecloud bot commented Jan 7, 2025

@sadilchamishka sadilchamishka merged commit dbd7e44 into wso2:master Jan 8, 2025
3 checks passed
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.

2 participants