confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
78 stars 866 forks source link

Missing Error messages if schema registry service returns a 403 (or any other) http code #436

Open DariosKrimsKrams opened 6 years ago

DariosKrimsKrams commented 6 years ago

Description

Short: An incorrect connection to the schema registry service leads to a invalid json parse error (don't know the exact message).

Long: My program tries to reach the Schema Registry Service at port 8081, it's actually run at port 8083. At port 8081 there is another service returning a http code 403 (Bad Request). When the Avro Consumer / Producer tries to reach any resources, the don't throws a 'can not connect correctly' error, but return a 'json parsing' error. Just tested it with 403 error, but I think it's the same with any 400 or 500 error code. I had the problem at the Consumer side (when trying to process a working kafka Event) as well as on Producer side (when trying to send an event).

Excepted: At a http error, it should return a error message containing the error Actual: showing an error, that the return value he tried to parse as json is invalid

How to reproduce

Change the port of the schema registry service where another (or no) service is running.

Checklist

Please provide the following information:

mhowlett commented 6 years ago

thanks for the report. I'll label as a bug and will try to get to looking into it before we do a release that includes the Avro / SR functionality.