Skip to content
Snippets Groups Projects
Commit c46a7221 authored by Subhan Shah's avatar Subhan Shah
Browse files

#34 Update errors.IsRetryableError to explicitly check and return false for any 400 errors.

parent 697404cb
No related branches found
No related tags found
1 merge request!36Resolve "Cater for errors being nil and update checks for retryable errors"
......@@ -9,6 +9,7 @@ import (
)
// CustomError implements the following interfaces:
//
// error
// github.com/pkg/errors: Cause
type CustomError struct {
......@@ -262,5 +263,10 @@ func IsRetryableError(err error) bool {
return true
}
// Explicitly check for and return false for any 400s as well
if code >= 400 && code < 500 {
return false
}
return false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment