Class: Grape::ErrorFormatter::Txt
- Defined in:
- lib/grape/error_formatter/txt.rb
Class Method Summary collapse
Methods inherited from Base
call, inherited, present, wrap_message
Class Method Details
.format_structured_message(structured_message) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/grape/error_formatter/txt.rb', line 6 def self.() = [:message] || Grape::Json.dump() Array.wrap().tap do || if .key?(:backtrace) << 'backtrace:' .concat([:backtrace]) end if .key?(:original_exception) << 'original exception:' << [:original_exception] end end.join("\r\n ") end |