Exception: Lunanode::APIError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/lunanode/api_error.rb

Overview

A RuntimeError raised when the API call returns unsuccessfully.

Instance Method Summary collapse

Instance Method Details

#to_sObject


8
9
10
11
12
13
# File 'lib/lunanode/api_error.rb', line 8

def to_s
  unescaped = CGI.unescapeHTML(super)
  JSON.pretty_generate(JSON.parse(unescaped))
rescue JSON::ParserError
  unescaped
end