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

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

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")
Copy link
Contributor

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.

None yet

3 participants