Exception: Typekit::Client::APIError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/typekit/client.rb

Direct Known Subclasses

ResourceDoesNotExistError, ServiceError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ APIError

Returns a new instance of APIError.



107
108
109
# File 'lib/typekit/client.rb', line 107

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



105
106
107
# File 'lib/typekit/client.rb', line 105

def response
  @response
end

Instance Method Details

#to_sObject



111
112
113
# File 'lib/typekit/client.rb', line 111

def to_s
  @response['errors'].first if @response['errors'].any?
end