19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/rock_rms/error.rb', line 19
def on_complete(env)
case env[:status]
when 400
raise RockRMS::BadRequest, error_message(env)
when 401
raise RockRMS::Unauthorized, error_message(env)
when 403
raise RockRMS::Forbidden, error_message(env)
when 404
raise RockRMS::NotFound, error_message(env)
when 500
raise RockRMS::InternalServerError, error_message(env)
when 502
raise RockRMS::BadGateway, error_message(env)
when 503
raise RockRMS::ServiceUnavailable, error_message(env)
when 504
raise RockRMS::GatewayTimeout, error_message(env)
when 520, 521, 522, 526
raise RockRMS::CloudflareError, error_message(env)
when ERROR_STATUSES
raise RockRMS::Error, error_message(env)
end
check_html_error(env)
end
|