-
Notifications
You must be signed in to change notification settings - Fork 107
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
Improves ParseError response when server response is an unknown json #592
Conversation
Signed-off-by: vatsal <[email protected]>
Signed-off-by: vatsal <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #592 +/- ##
===========================================
+ Coverage 57.29% 67.99% +10.70%
===========================================
Files 315 376 +61
Lines 9823 8862 -961
===========================================
+ Hits 5628 6026 +398
+ Misses 2902 1555 -1347
+ Partials 1293 1281 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Thank you!
Is this a breaking change for users or can we make this backwards compatible? If yes, it's likely a major version bump that would need to be done in the same PR, and I definitely think it needs an entry in https://github.com/opensearch-project/opensearch-go/blob/main/UPGRADING.md.
I think we need to document error handling somewhere in USER_GUIDE, including this behavior, maybe you want to start a guide on that or add to existing ones?
Signed-off-by: vatsal <[email protected]>
I am attending a triage meeting with opensearch indexing team on Monday to get more insights into error handling. We can work on a guide for error handling after that. |
@dblock The fix with Opensearch will likely go in 3.0. Also, we don't have documentation for error responses. I created issues with documentation after discussion in triage meeting today. For now, I will get started with USER_GUIDE with the changes in this PR and prepare for a release. |
Signed-off-by: vatsal <[email protected]>
I added documentation in UPGRADING.md. I read RELEASING.md. I believe release manager is authorized to perform the release process. Please let me know if any further action is required from my end for the release. |
I didn't see an answer on whether there is any way to make this backwards compatible, so I presume not and I am good with this - @Jakob3xD could you also please take a look (merge if it's good with you)? |
@dblock Apologies for the confusion. |
Description
In ParseError, when json response from server is unknown, it used to return a string response (
*fmt.wrapError
). This is now changed to return a StringError struct (*opensearch.StringError
).Issues Resolved
Closes #582
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.