-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker]Update interceptor handler exception #18940
[fix][broker]Update interceptor handler exception #18940
Conversation
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.
Is it possible to add a test to avoid regression?
Thanks, fixed, PTAL |
@codelipenghui @poorbarcode @mattisonchao @fantapsody @Technoboy- @gaoran10 PTAL, thanks |
Codecov Report
@@ Coverage Diff @@
## master #18940 +/- ##
============================================
- Coverage 47.35% 46.51% -0.84%
- Complexity 9384 10470 +1086
============================================
Files 623 703 +80
Lines 59104 68856 +9752
Branches 6146 7386 +1240
============================================
+ Hits 27987 32029 +4042
- Misses 28100 33221 +5121
- Partials 3017 3606 +589
Flags with carried forward coverage won't be shown. Click here to find out more.
|
(cherry picked from commit e07b67f)
(cherry picked from commit e07b67f)
(cherry picked from commit e07b67f)
Fixes #xyz
Master Issue: #xyz
Motivation
The pulsar-admin client does not correctly handle error messages from the interceptor response. The interceptor response is a string, but the client tries to parse it as an errorData object
https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java#L323
Modifications
Update the response to a json object, update the response to a json object, which shouldn't cause a breaking change. The client will get the error message from the previous
reason-content
to"{"reason": "reason-content"}"
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: AmateurEvents#32