class NftmakerApi::Error
Public Class Methods
new(response)
click to toggle source
# File lib/nftmaker_api/error.rb, line 3 def initialize(response) @response = response end
Public Instance Methods
reason()
click to toggle source
# File lib/nftmaker_api/error.rb, line 20 def reason @response.to_h.fetch("errorMessage") { nil } end
status()
click to toggle source
# File lib/nftmaker_api/error.rb, line 12 def status @response.original.status end
status_phrase()
click to toggle source
# File lib/nftmaker_api/error.rb, line 16 def status_phrase @response.original.reason_phrase end
to_s()
click to toggle source
# File lib/nftmaker_api/error.rb, line 7 def to_s ["#{status} #{status_phrase}", reason].compact.join(", ") end
Also aliased as: full_message