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

DGS-1546 Map JsonMappingException to 400 response #243

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

xiaoyali97
Copy link
Member

@xiaoyali97 xiaoyali97 commented Apr 15, 2021

fix #9
jira: https://confluentinc.atlassian.net/browse/DGS-1546

Test
Unit test added.

Example response

 % curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"schema": {}}' \
    http://localhost:8081/subjects/Kafka-key/versions
{"error_code":400,"message":"Cannot deserialize instance of `java.lang.String` out of START_OBJECT token\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 12] (through reference chain: io.confluent.kafka.schemaregistry.client.rest.entities.requests.RegisterSchemaRequest[\"schema\"])"}%

@xiaoyali97 xiaoyali97 changed the title implement JsonMappingExceptionMapper to map JsonMappingException to 4… DGS-1546 Map JsonMappingException to 400 response Apr 15, 2021
Copy link
Member

@rayokota rayokota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xiaoyali97 , LGTM!

@xiaoyali97 xiaoyali97 marked this pull request as ready for review April 15, 2021 18:44
@xiaoyali97 xiaoyali97 requested a review from ewencp April 15, 2021 18:48
@xiaoyali97 xiaoyali97 merged commit ff5231e into confluentinc:6.0.x Apr 19, 2021
@xiaoyali97 xiaoyali97 deleted the DGS-1546 branch April 19, 2021 18:31
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

Successfully merging this pull request may close these issues.

2 participants