Skip to content

Commit

Permalink
Raise CloudflareError on 520, 521, and 522 response codes
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrooks committed Jun 10, 2024
1 parent b742159 commit f39e3e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rock_rms/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def on_complete(env)
raise RockRMS::ServiceUnavailable, error_message(env)
when 504
raise RockRMS::GatewayTimeout, error_message(env)
when 520
raise RockRMS::CloudflareError, error_message(env)
when 522
when 520, 521, 522
raise RockRMS::CloudflareError, error_message(env)
when ERROR_STATUSES
raise RockRMS::Error, error_message(env)
Expand Down

0 comments on commit f39e3e4

Please sign in to comment.