Module: Yelp::Error

Defined in:
lib/yelp/error.rb

Defined Under Namespace

Classes: AccountUnconfirmed, AlreadyConfigured, AreaTooLarge, Base, BoundingBoxNotComplete, BusinessUnavailable, ExceededReqs, ExceededRequests, InternalError, InvalidOAuthCredentials, InvalidOAuthUser, InvalidParameter, InvalidSignature, MissingAPIKeys, MissingLatLng, MissingParameter, MultipleLocations, ResponseValidator, UnavailableForLocation

Class Method Summary collapse

Class Method Details

.check_for_error(response) ⇒ Object

Check the response for errors, raising an appropriate exception if necessary

Parameters:

  • response

    from the Yelp API



43
44
45
46
# File 'lib/yelp/error.rb', line 43

def self.check_for_error(response)
  @response_validator ||= ResponseValidator.new
  @response_validator.validate(response)
end