lib/grape/error_formatter/txt.rb in grape-0.8.0 vs lib/grape/error_formatter/txt.rb in grape-0.9.0
- old
+ new
@@ -1,9 +1,11 @@
module Grape
module ErrorFormatter
module Txt
class << self
def call(message, backtrace, options = {}, env = nil)
+ message = Grape::ErrorFormatter::Base.present(message, env)
+
result = message.is_a?(Hash) ? MultiJson.dump(message) : message
if (options[:rescue_options] || {})[:backtrace] && backtrace && !backtrace.empty?
result += "\r\n "
result += backtrace.join("\r\n ")
end