Method: WishSimple::Response::RaiseError#error_message
- Defined in:
- lib/wishsimple/response/raise_error.rb
#error_message(response) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/wishsimple/response/raise_error.rb', line 33 def (response) if response[:body] && response[:body].is_a?(String) body = MultiJson.load(response[:body], symbolize_keys: true) body[:error] || '' else '' end end |