From 6d89bddf2904944221eb5478091bfc44de4ee524 Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Sat, 19 Nov 2022 23:06:27 +0800 Subject: [PATCH] fix: better error return --- dns/doh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/doh.go b/dns/doh.go index 4d928bdc..02cf63e8 100644 --- a/dns/doh.go +++ b/dns/doh.go @@ -144,7 +144,7 @@ func (doh *dnsOverHTTPS) ExchangeContext(ctx context.Context, m *D.Msg) (msg *D. // If the request failed anyway, make sure we don't use this client. _, resErr := doh.resetClient(ctx, err) - return nil, fmt.Errorf("err:%v,resErr:%v", err, resErr) + return nil, fmt.Errorf("%w (resErr:%v)", err, resErr) } return msg, err