-
Notifications
You must be signed in to change notification settings - Fork 44
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 message for client configuration failures #373
Conversation
Improve error message for client configuration failures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RDPerera Shall we add negative test(s) to cover these client init error scenarios?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2201.8.x #373 +/- ##
============================================
+ Coverage 74.03% 74.11% +0.08%
============================================
Files 14 14
Lines 1186 1182 -4
Branches 713 709 -4
============================================
- Hits 878 876 -2
+ Misses 308 306 -2 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
httpHandlerResult = new http:ClientOAuth2Handler(auth); | ||
} else { | ||
return error(INVALID_CLIENT_CONFIG); | ||
httpHandlerResult = new http:ClientBearerTokenAuthHandler(auth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ClientOAuth2Provider initialization, we panic[1]. So, we need to trap the error.
fixes: wso2-enterprise/internal-support-ballerina#838