Don't throw away the inner exception
See original GitHub issueDescription
The RestClient for SchemaRegistry throws away the inner exception:
So that error messages become:
without an inner exception. Simply pass the caught exception into the c’tor to fix this issue.
How to reproduce
Make the schema registry TLS endpoint be something that this client doesn’t like.
Similarly, it’s impossible to override the logic for validating TLS certificates due to how the HttpClient is created:
This is doubly annoying because it would seem that, by explicitly creating a new HttpRequestMessage
in CreateRequest
, the global ServicePointManager.ServerCertificateValidationCallback
that I tried setting, is overridden and defaulted.
Finally it’s annoying because it would seem that on macOS, .Net Core doesn’t default to using the system-configured certificates, so even if this certificate is valid for me outside .net, it’s not inside .net.
Checklist
I haven’t followed it because this issue is a review of the source code.
Please provide the following information:
- A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
- Confluent.Kafka nuget version.
- Apache Kafka version.
- Client configuration.
- Operating system.
- Provide logs (with “debug” : “…” as necessary in configuration).
- Provide broker log excerpts.
- Critical issue.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top GitHub Comments
thanks @haf - I think you have made me realize we should allow the user to pass in their own
HttpClient
instance, or collection of them for HA.from an API perspective, I think that means it’s time to introduce a
SchemaRegistryClientBuilder
, and this should create aISchemaRegistryClient
. I thinkCachedSchemaRegistryClient
can remain user createable though as is, for now at least.i probably won’t get to this immediately, but it shouldn’t be too hard. i’d probably be able to review a smallish high quality PR though to get it in quickly.
this hasn’t been addressed yet. will happily review PR for exposing inner exceptions and get it merged if it’s good.