From d90309256ea7af1f6c9015e3c723838854e103ee Mon Sep 17 00:00:00 2001 From: Marcin Figiel Date: Mon, 18 Mar 2024 16:14:56 +0100 Subject: [PATCH] Use proper error object in processor error handling code --- processor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processor.go b/processor.go index eace0f1..bce0adf 100644 --- a/processor.go +++ b/processor.go @@ -188,7 +188,7 @@ func (p *processor) handle(ctx *fh.RequestCtx) { if p.cfg.Metadata && p.cfg.Tenant.Default != "" { r := p.send(clientIP, reqID, tenantPrefix+p.cfg.Tenant.Default, wrReqIn) if r.err != nil { - ctx.Error(err.Error(), fh.StatusInternalServerError) + ctx.Error(r.err.Error(), fh.StatusInternalServerError) p.Errorf("src=%s req_id=%s: unable to proxy metadata: %s", clientIP, reqID, r.err) return }