From 0af563b497e7fa7cbd93ca04a5a372b1c3fff861 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 2 May 2023 11:10:27 +0200 Subject: [PATCH] fix(gateway): deescalating log in gateway's writeErr (#2142) Closes #2141 writeError is called by almost all gateway endpoints. If a client makes a request for bad data, that is not an error for the server - but still useful as a debug log. --- api/gateway/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/gateway/util.go b/api/gateway/util.go index 6ae130c7f4..bffd7ebc88 100644 --- a/api/gateway/util.go +++ b/api/gateway/util.go @@ -6,7 +6,7 @@ import ( ) func writeError(w http.ResponseWriter, statusCode int, endpoint string, err error) { - log.Errorw("serving request", "endpoint", endpoint, "err", err) + log.Debugw("serving request", "endpoint", endpoint, "err", err) w.WriteHeader(statusCode) errBody, jerr := json.Marshal(err.Error())