Skip to content
Snippets Groups Projects

Resolve "Cater for errors being nil and update checks for retryable errors"

1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
  • 697404cb
    #34 Check if err is nil in errors.HTTPWithError. · 697404cb
    Subhan Shah authored
+ 5
0
@@ -101,6 +101,11 @@ func HTTPCodeOnly(code int) error {
}
func HTTPWithError(code int, err error) error {
// This check is here just as a failsafe, if err is nil then just return nil because there's nothing that happened.
if err == nil {
return nil
}
wrappedErr := &CustomError{
code: code,
message: err.Error(),
Loading