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