Exception: Lolp::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Lolp::Error
show all
- Defined in:
- lib/lolp/errors.rb
Direct Known Subclasses
BadGateway, BadRequest, ClientError, Conflict, Forbidden, InternalServerError, NotAcceptable, NotFound, NotImplemented, PaymentRequired, ServerError, ServiceUnavailable, Unauthorized, UnprocessableEntity
Class Method Summary
collapse
Class Method Details
.build_error_message(res = nil) ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/lolp/errors.rb', line 26
def build_error_message(res = nil)
return nil if res.nil?
message = "#{res.env.method.to_s.upcase} "
message << "#{res.env.url}: "
message << "#{res.status} - "
message << "#{res.body}" if res.body
message
end
|
.from_response(r) ⇒ Object