Skip to content

Commit

Permalink
refactor: check for error not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickMenoti committed Jul 22, 2024
1 parent b89b2ce commit bd98115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func ErrorPerStatusCode(httpResp *http.Response, err error) error {
// checks varying errors that may occur when status code is 500
func checkStatusCode500Error(err error) error {

if strings.Contains(err.Error(), "Client.Timeout") {
if err != nil && strings.Contains(err.Error(), "Client.Timeout") {
return ErrorTimeoutAPICall
}

Expand Down

0 comments on commit bd98115

Please sign in to comment.