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

Raise error if unknow status code is passed to #status #952

Merged
merged 1 commit into from
Mar 10, 2015

Conversation

dabrorius
Copy link
Contributor

  • Raise error if given status code is not included Rack::HTTP_STATUS_CODES
  • Raise error if given status is not a Fixnum or Symbol

- Raise error if given status code is not included Rack::HTTP_STATUS_CODES
- Raise error if given status is not a Fixnum or Symbol
@dabrorius dabrorius force-pushed the filter_invalid_response_codes branch from 7b3ad91 to 2225485 Compare March 10, 2015 12:11
@dblock
Copy link
Member

dblock commented Mar 10, 2015

👍

dblock added a commit that referenced this pull request Mar 10, 2015
Raise error if unknow status code is passed to #status
@dblock dblock merged commit 514a2e5 into ruby-grape:master Mar 10, 2015
@dm1try
Copy link
Member

dm1try commented Mar 10, 2015

Why the error is raised if given status code is "unknown" Fixnum?
RFC2616 says HTTP status codes are extensible.

@dblock
Copy link
Member

dblock commented Mar 10, 2015

Yeah, I missed that part, @dabrorius you should be able to do status [any number]. Would you please care to undo that? Thanks for raising this @dm1try.

@dabrorius
Copy link
Contributor Author

Sure no problem, I'll start another PR

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