From 7b5f12c20860673ee1d41e42eca7ef6e98251e1d Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 30 May 2023 18:55:08 +0200 Subject: [PATCH] feat: make webError return false and ensure ci fails because return value is ignored --- gateway/errors.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gateway/errors.go b/gateway/errors.go index fa143dd24..9f9db44e4 100644 --- a/gateway/errors.go +++ b/gateway/errors.go @@ -123,7 +123,7 @@ func (e *ErrorResponse) Unwrap() error { return e.Err } -func (i *handler) webError(w http.ResponseWriter, r *http.Request, err error, defaultCode int) { +func (i *handler) webError(w http.ResponseWriter, r *http.Request, err error, defaultCode int) bool { code := defaultCode // Pass Retry-After hint to the client @@ -170,6 +170,8 @@ func (i *handler) webError(w http.ResponseWriter, r *http.Request, err error, de } else { http.Error(w, err.Error(), code) } + + return false } func isErrNotFound(err error) bool {