fix: do not retry rnf bad request

This commit is contained in:
simon lehericey 2024-03-29 12:20:04 +01:00
parent dd6c558541
commit 8405c83c12
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
2 changed files with 13 additions and 0 deletions

View file

@ -8,6 +8,10 @@ class RNFService
Success(body)
in Failure(code:, reason:) if code.in?(401..403)
Failure(API::Client::Error[:unauthorized, code, false, reason])
# 400 errors are due to invalid rfn code
# it cannot be fixed so we do not retry
in Failure(code: 400, reason:)
Failure(API::Client::Error[:bad_request, code, false, reason])
else
result
end