Class: Typekit::Processing::Converter::Errors

Inherits:
Object
  • Object
show all
Defined in:
lib/typekit/processing/converter/errors.rb

Constant Summary collapse

ERRORS =
{
  400 => 'There are errors in the data provided by your application',
  401 => 'Authentication is needed to access the requested endpoint',
  403 => 'Your application has been rate limited',
  404 => 'You are requesting a resource that does not exist',
  500 => 'The servers of Typekit are unable to process the request',
  503 => 'The Typekit API is offline for maintenance'
}

Instance Method Summary collapse

Instance Method Details

#process(response, errors) ⇒ Object

Raises:



16
17
18
# File 'lib/typekit/processing/converter/errors.rb', line 16

def process(response, errors)
  raise Error, Array(errors || ERRORS[response.code]).join(', ')
end