Skip to content

MMA-11901: Suppress json parse error if debug config is disabled#313

Draft
Shailesh Panwar (srpanwar-confluent) wants to merge 1 commit intoconfluentinc:masterfrom
srpanwar-confluent:MMA-11901
Draft

MMA-11901: Suppress json parse error if debug config is disabled#313
Shailesh Panwar (srpanwar-confluent) wants to merge 1 commit intoconfluentinc:masterfrom
srpanwar-confluent:MMA-11901

Conversation

@srpanwar-confluent
Copy link
Contributor

Jira: https://confluentinc.atlassian.net/browse/MMA-11901

What
Rather than creating a new flag, this change piggybacks on the existing debug config to suppress the JSON parsing error message. We replace the actual message with a generic Error parsing JSON text.


public Response toResponse(JsonParseException exception) {
return Response.status(Status.BAD_REQUEST)
.entity("Error parsing JSON")

Choose a reason for hiding this comment

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

Can't we at least send exception.getMessage()? The user is losing critical information to understand what went wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

3 participants