Skip to content

Commit cc91dbb

Browse files
fix: Simplify implementation to catch all network errors
1 parent 80462e7 commit cc91dbb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

auth/oauth.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,5 @@ func GetTokens() (*Tokens, error) {
195195

196196
func isNetworkError(err error) bool {
197197
var netErr net.Error
198-
if errors.As(err, &netErr) {
199-
return true
200-
}
201-
202-
// Handle DNS resolution errors directly
203-
var dnsErr *net.DNSError
204-
return errors.As(err, &dnsErr)
198+
return errors.As(err, &netErr)
205199
}

0 commit comments

Comments
 (0)