lib/grape/error_formatter/json.rb in grape-0.6.0 vs lib/grape/error_formatter/json.rb in grape-0.6.1
- old
+ new
@@ -2,12 +2,12 @@
module ErrorFormatter
module Json
class << self
def call(message, backtrace, options = {}, env = nil)
- result = message.is_a?(Hash) ? message : { :error => message }
- if (options[:rescue_options] || {})[:backtrace] && backtrace && ! backtrace.empty?
- result = result.merge({ :backtrace => backtrace })
+ result = message.is_a?(Hash) ? message : { error: message }
+ if (options[:rescue_options] || {})[:backtrace] && backtrace && !backtrace.empty?
+ result = result.merge(backtrace: backtrace)
end
MultiJson.dump(result)
end
end