Sha256: 435cb3ae24cffb6cd18e5cc856befc8b4c3884209df03715b921fc8e59156a62
Contents?: true
Size: 453 Bytes
Versions: 11
Compression:
Stored size: 453 Bytes
Contents
module Grape 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 }) end MultiJson.dump(result) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems