Skip to content
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

Schema registry client shouldn't try to parse error response bodies #2574

Closed
joelezellLP opened this issue Mar 10, 2023 · 2 comments
Closed

Comments

@joelezellLP
Copy link

I just spent days trying to debug a problem which initially looked like a JSON parsing issue but which turned out to be a HTTP gateway timeout. It sure would have been nice if the schema registry client had just logged the error code and message body. It looks like this behavior was corrected for auth errors, but it should have been addressed more broadly.
#733

I also see that there's a MR to do a broader fix, but it's been in existence since 2019 and I feel that the implementation should be different. Basically, if you get a 4xx or 5xx response, just log that error code and the raw message body.
#1200

There are a number of other posts on various forums about this sort of error so it's confusing a whole bunch of people out there. Here's the exception I got:

io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Unrecognized token 'upstream': was expecting (JSON String, Number (or 'NaN'/'INF'/'+INF'), Array, Object or token 'null', 'true' or 'false')

@chile12
Copy link

chile12 commented Mar 29, 2023

@joelezellLP I would agree with you completely.
Yet, may I know how you resolved the issue itself, as I receive the same exception from the registry, trying to register a json schema.

@rayokota
Copy link
Member

Fixed by #2642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants