Permalink
Browse files

added status message to response body

  • Loading branch information...
1 parent 97edae4 commit 69b7db5e4d1fe8f9f43e45bf7cde695515c5f4c9 @mkristian committed Feb 22, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/ixtlan/errors/rack.rb
View
5 lib/ixtlan/errors/rack.rb
@@ -19,6 +19,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
require 'rack/request'
+require 'rack/utils'
module Ixtlan
module Errors
class Rack
@@ -67,12 +68,12 @@ def call(env)
@dumper.dump( e, env, {}, req.session, req.params )
end
if @dump_to_console
- warn "[Ixtlan] #{e.class}: #{e.message}"
+ warn "[Ixtlan::Errors] #{e.class}: #{e.message}"
warn "\t" + e.backtrace.join( "\n\t" ) if e.backtrace && status >= 500
end
[ status,
{'Content-Type' => 'text/plain'},
- [''] ]
+ [ ::Rack::Utils::HTTP_STATUS_CODES[ status ] ] ]
end
end

0 comments on commit 69b7db5

Please sign in to comment.