Skip to content

Commit

Permalink
Make DNS errors input errors to inform the user something is wrong wi…
Browse files Browse the repository at this point in the history
…th their network.
  • Loading branch information
mitchell-as committed Nov 7, 2023
1 parent 3038849 commit 5c9734a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/retryhttp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func normalizeResponse(res *http.Response, err error) (*http.Response, error) {

var dnsError *net.DNSError
if errors.As(err, &dnsError) {
return res, locale.WrapError(&UserNetworkError{}, "err_user_network_dns", "Request failed due to DNS error: {{.V0}}. {{.V1}}", err.Error(), locale.Tr("err_user_network_solution", constants.ForumsURL))
return res, locale.WrapInputError(&UserNetworkError{}, "err_user_network_dns", "Request failed due to DNS error: {{.V0}}. {{.V1}}", err.Error(), locale.Tr("err_user_network_solution", constants.ForumsURL))
}

// Due to Go's handling of these types of errors and due to Windows localizing the errors in question we have to rely on the `wsarecv:` keyword to capture a series
Expand Down

0 comments on commit 5c9734a

Please sign in to comment.