fix(02-03): surface reverse-proxy record failures in 502 bodies

Silent "upstream error" hid capture-rule failures during MCP token exchange.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-09-17 13:40:47 +02:00
parent 8881df9f7a
commit 2eb9b4b0c9

View File

@@ -107,7 +107,7 @@ func NewProxy(cfg ProxyConfig) (*Proxy, error) {
},
ModifyResponse: p.modifyResponse,
ErrorHandler: func(w http.ResponseWriter, r *http.Request, err error) {
http.Error(w, "tide: upstream error", http.StatusBadGateway)
http.Error(w, "tide: upstream error: "+err.Error(), http.StatusBadGateway)
},
}
return p, nil