Skip to content

Conversation

@janx
Copy link

@janx janx commented Jul 14, 2011

I just found the 'Content-Type' header for error response is always 'text/html', no matter you set error_format to :txt or :json, as demostrate by line 295-306 in spec/grape/api_spec.rb.

The commit also includes a little refactoring of format handling - duplicated codes are moved into Grape::Middleware::Base::Formats module.

mbleigh pushed a commit that referenced this pull request Jul 15, 2011
Content type for error response
@mbleigh mbleigh merged commit 8294f7f into ruby-grape:master Jul 15, 2011
mbleigh pushed a commit that referenced this pull request Dec 5, 2011
Content type for error response
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.

2 participants