New logic

This commit is contained in:
2024-05-16 16:37:02 +01:00
parent 63181a656a
commit 7df3e94185
2 changed files with 23 additions and 12 deletions

12
utils/http_codes.rb Normal file
View File

@@ -0,0 +1,12 @@
HTTP_CLIENT_ERROR_RANGE = 400..499
HTTP_SERVER_ERROR_RANGE = 500..599
HTTP_INFORMATIONAL_RANGE = 100..199
HTTP_SUCCESS_RANGE = 200..299
def is_client_err?(code)
HTTP_CLIENT_ERROR_RANGE === code
end
def is_server_err?(code)
end