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

Added support for JSON errors, objects in error! and handling runtime exceptions within Grape #30

Merged
merged 6 commits into from
May 27, 2011

Conversation

dblock
Copy link
Member

@dblock dblock commented May 4, 2011

  • The API has been extended to support three new options.
    • rescue_all_errors true # traps all exceptions within grape
    • error_format :json # returns errors in JSON format
    • default_error_status 200 # changes default status of raise-d errors from 403 to a custom value
  • Error can raise error!(hash, code) and pass that through
  • Error middleware has been extended to support these custom formatters.

@mbleigh mbleigh merged commit 09e7078 into ruby-grape:master May 27, 2011
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

2 participants