badRequest writes a 400 response with the given message and any extra structured log attributes. Use when the client sent a request we cannot parse or that fails our own validation rules.
(r *http.Request, w http.ResponseWriter, msg string, attrs ...slog.Attr)
| 800 | // structured log attributes. Use when the client sent a request we cannot |
| 801 | // parse or that fails our own validation rules. |
| 802 | func (h *commitServiceHandler) badRequest(r *http.Request, w http.ResponseWriter, msg string, attrs ...slog.Attr) { |
| 803 | h.logHandlerError(r, w, msg, http.StatusBadRequest, attrs...) |
| 804 | } |
| 805 | |
| 806 | // upstreamError writes a 502 response with the given message and any extra |
| 807 | // structured log attributes. Use when the request was well-formed but |
no test coverage detected