From 8d4d453aede953a99f20c909b06ec0fbf4540227 Mon Sep 17 00:00:00 2001 From: Owen Cabalceta Date: Tue, 27 Feb 2024 11:37:15 -0500 Subject: [PATCH] chore: typo --- httpClient.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/httpClient.go b/httpClient.go index 33502ae7..6bb8025f 100644 --- a/httpClient.go +++ b/httpClient.go @@ -8,6 +8,7 @@ import ( "errors" "net" "net/http" + "net/url" "strconv" "strings" "time" @@ -101,8 +102,10 @@ func getDoErrReason(err error) string { return opErrReason } else if errors.Is(err, net.UnknownNetworkError("")) { return networkErrReason - } else if err := errors.Unwrap(err).Error(); strings.TrimSpace(strings.ToLower(err)) == "eof" { - return connectionUnexpectedlyClosedEOFReason + } else if err, ok := err.(*url.Error); ok { + if strings.TrimSpace(strings.ToLower(err.Unwrap().Error())) == "eof" { + return connectionUnexpectedlyClosedEOFReason + } } return genericDoReason