7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/faraday/response/raise_dio_error.rb', line 7
def on_complete(response)
case response[:status].to_i
when 400
raise Ronnie::BadRequest, error_message(response)
when 401
raise Ronnie::Unauthorized, error_message(response)
when 403
raise Ronnie::Forbidden, error_message(response)
when 404
raise Ronnie::NotFound, error_message(response)
when 406
raise Ronnie::NotAcceptable, error_message(response)
when 422
raise Ronnie::UnprocessableEntity, error_message(response)
when 500
raise Ronnie::InternalServerError, error_message(response)
when 501
raise Ronnie::NotImplemented, error_message(response)
when 502
raise Ronnie::BadGateway, error_message(response)
when 503
raise Ronnie::ServiceUnavailable, error_message(response)
end
end
|