Sha256: d3580c14adf77b591ed879feb6d8b41d8464c48bc6db4e3b82150fd70611a995
Contents?: true
Size: 490 Bytes
Versions: 3
Compression:
Stored size: 490 Bytes
Contents
module Grape module ErrorFormatter module Xml class << self def call(message, backtrace, options = {}, env = nil) result = message.is_a?(Hash) ? message : { message: message } if (options[:rescue_options] || {})[:backtrace] && backtrace && !backtrace.empty? result = result.merge(backtrace: backtrace) end result.respond_to?(:to_xml) ? result.to_xml(root: :error) : result.to_s end end end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
grape-security-0.8.0 | lib/grape/error_formatter/xml.rb |
grape-0.8.0 | lib/grape/error_formatter/xml.rb |
grape-0.7.0 | lib/grape/error_formatter/xml.rb |