Skip to content

Error when decoding response from schema registry on request sent with header Accept: application/vnd.schemaregistry.v1+json #146

@andyrift

Description

@andyrift

Using avro and trying to use TopicNameStrategyWithSchema, schema validation fails with error could not parse to RawRegisteredSchema with cause error decoding response body
I tested with curl and the problem appears to be that we allow server to send data in format vnd.schemaregistry.v1+json but then try to only parse json

I can't really show screenshots or exact examples because corporate.
But I debugged with curl and narrowed the problem down to what is in this issue's name.

The exact line with the problem:

.header(ACCEPT, "application/vnd.schemaregistry.v1+json"),

So this

            .header(ACCEPT, "application/vnd.schemaregistry.v1+json"),

Needs to be this

            .header(ACCEPT, "application/json"),

I applied the fix locally and it solved the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions