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

Set status for endpoints when an error occours #698

Merged

Conversation

dspaeth-faber
Copy link
Contributor

With this PR status for EndPoint is set when an error accour's like mentioned in #697.
So a ErrorFormatter can use the status.

@@ -2,6 +2,7 @@
============

* [#687](https://github.com/intridea/grape/pull/687): Fix: `mutually_exclusive` and `exactly_one_of` validation error messages now label parameters as strings, consistently with `requires` and `optional` - [@dblock](https://github.com/dblock).
* [#128](https://github.com/intridea/grape/pull/698): `error!` sets `status` for `EndPoint` to [@dspaeth-faber](https://github.com/dspaeth-faber).
Copy link
Member

Choose a reason for hiding this comment

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

EndPoint is actually Endpoint, please fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@dblock
Copy link
Member

dblock commented Jul 30, 2014

While we're at it. What's status before it's set? I think it should be 200 via whatever the default is, right? Maybe add a spec for that and document status in README?

@dblock
Copy link
Member

dblock commented Jul 30, 2014

Merging this, though, thx.

dblock added a commit that referenced this pull request Jul 30, 2014
…rors

Set status for endpoints when an error occours
@dblock dblock merged commit 52b63db into ruby-grape:master Jul 30, 2014
@dspaeth-faber dspaeth-faber deleted the set_endpoint_status_for_errors branch July 30, 2014 12:32
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