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

Default JSON error handler to reject message #14

Merged
merged 3 commits into from
Nov 30, 2022

Conversation

brerx
Copy link
Contributor

@brerx brerx commented Nov 24, 2022

I would prefer this as a default. All the code where codecov is enabled currently has to look like this:

  use Ears::Middlewares::JSON,
      # :nocov:
      on_error: Proc.new { :reject }
  # :nocov:

this is ugly.

Any objections?

README.md Outdated Show resolved Hide resolved
Co-authored-by: Johannes Lüdke <johannes.luedke@posteo.de>
README.md Outdated Show resolved Hide resolved
Co-authored-by: Thomas Frütel <github@fruetel.de>
Copy link
Contributor

@Fruetel Fruetel left a comment

Choose a reason for hiding this comment

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

Seems like a good idea.

@brerx brerx merged commit 9a62fbb into master Nov 30, 2022
@brerx brerx deleted the reject-json-parse-error-by-default branch November 30, 2022 15:36
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.

4 participants