Class: Bkblz::V1::RequestError
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error_response) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(error_response) ⇒ RequestError
Returns a new instance of RequestError.
19 20 21 |
# File 'lib/bkblz/v1/request.rb', line 19 def initialize(error_response) super error_response. end |
Class Method Details
.create(error_response) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/bkblz/v1/request.rb', line 10 def self.create(error_response) case error_response.to_model.status when 401 UnauthorizedRequestError.new error_response else RequestError.new error_response end end |