Return error with application/json content type by default
This commit is contained in:
parent
1c149bcdb4
commit
e093fde18c
|
@ -113,7 +113,7 @@ module Travis::Api
|
||||||
app.call(env)
|
app.call(env)
|
||||||
rescue
|
rescue
|
||||||
if Endpoint.production?
|
if Endpoint.production?
|
||||||
[500, {'Content-Type' => 'text/plain'}, ['Travis encountered an error, sorry :(']]
|
[500, {'Content-Type' => 'application/json'}, ["{'error': 'Travis encountered an error, sorry :('}"]]
|
||||||
else
|
else
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user