From 68b91d2128c7be3c4f060091b172c39057318ad4 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Sat, 29 Apr 2023 17:44:20 +0100 Subject: [performance] tweak http client error handling (#1718) * update errors library, check for more TLS type error in http client Signed-off-by: kim * bump cache library version to match errors library Signed-off-by: kim --------- Signed-off-by: kim --- vendor/codeberg.org/gruf/go-errors/v2/value.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vendor/codeberg.org/gruf/go-errors/v2/value.go') diff --git a/vendor/codeberg.org/gruf/go-errors/v2/value.go b/vendor/codeberg.org/gruf/go-errors/v2/value.go index 6a1f64451..6d7ec3a25 100644 --- a/vendor/codeberg.org/gruf/go-errors/v2/value.go +++ b/vendor/codeberg.org/gruf/go-errors/v2/value.go @@ -1,5 +1,7 @@ package errors +import "errors" + // WithValue wraps err to store given key-value pair, accessible via Value() function. func WithValue(err error, key any, value any) error { if err == nil { @@ -16,7 +18,7 @@ func WithValue(err error, key any, value any) error { func Value(err error, key any) any { var e *errWithValue - if !As(err, &e) { + if !errors.As(err, &e) { return nil } @@ -47,7 +49,7 @@ func (e *errWithValue) Value(key any) any { return e.val } - if !As(e.err, &e) { + if !errors.As(e.err, &e) { return nil } } -- cgit v1.2.3