generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 15
chore: Improve Exception Handling and Accessors to Response/Request #529
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fa6a86d
Initial
newtork 2e75315
Drive by code improvement
newtork 8fee865
Fix test
newtork 5bed6c2
Fix annotation
newtork ec016d2
Add missing http response
newtork c6ab27c
Reduce complexity of exception factory
newtork a53de59
Fix compilation
newtork 95b9544
Improve code style
newtork 825b9c1
Formatting
bot-sdk-js 59cac0f
Minor Code cleanup
newtork 7f02ee2
Merge branch 'exceptions-with-httpresponse' of https://github.com/SAP…
newtork 2583f2c
Add/Update release note
newtork ba693ee
Merge remote-tracking branch 'origin/main' into exceptions-with-httpr…
newtork 34e7ec4
Fix merge conflict
newtork 43bec20
Establish public getMessage() in interface
newtork 0396673
Formatting
bot-sdk-js 6d06899
Remove duplicate
newtork 64573d8
Merge remote-tracking branch 'origin/exceptions-with-httpresponse' in…
newtork File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
(Question/Suggestion)
Should
getClientError()remainprotected? As far as I see,ClientErroris an internal wrapper for error response.For users, there exist a
getErrorResponse()in module specific exceptions likeOpenAiClientExceptionto shortcut access to the error response.I feel like
getErrorResponse()is convenient thangetClientError()and would reduce confusion. Having both methodpublicmay be redundant?Uh oh!
There was an error while loading. Please reload this page.
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.
The following API is available
The
e.getClientError().getMessage()is the reason.However I would also prefer if it wasn't split.
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.
The string from
e.getMessage()containse.getClientError().getMessage().We don't need to expose
e.getClientError().getMessage()and leave it as simply a method for error response type-agnostic retrieval of message.No strong opinion.
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.
I was not planning to challenge visibility of this method in this PR. 🤔