class WCC::Contentful::SimpleClient::ApiError

Attributes

response[R]

Public Class Methods

[](code) click to toggle source
# File lib/wcc/contentful/simple_client/response.rb, line 196
def self.[](code)
  case code
  when 404
    NotFoundError
  when 401
    UnauthorizedError
  when 429
    RateLimitError
  else
    ApiError
  end
end
new(response) click to toggle source
Calls superclass method
# File lib/wcc/contentful/simple_client/response.rb, line 209
def initialize(response)
  @response = response
  super(response.error_message)
end