Class: Yelp::Fusion::Error::ResponseValidator
- Inherits:
-
Object
- Object
- Yelp::Fusion::Error::ResponseValidator
- Defined in:
- lib/yelp/fusion/error.rb
Overview
Class to handle error responses
Instance Method Summary collapse
-
#validate(response) ⇒ Object
If the request is not successful, raise an appropriate Yelp::Error exception with the error text from the request response.
Instance Method Details
#validate(response) ⇒ Object
If the request is not successful, raise an appropriate Yelp::Error exception with the error text from the request response.
33 34 35 36 37 |
# File 'lib/yelp/fusion/error.rb', line 33 def validate(response) return if successful_response?(response) raise error_from_response(response) end |