MCPcopy
hub / github.com/harness/harness / BadRequestf

Function BadRequestf

app/api/render/render_error.go:57–59  ·  view source on GitHub ↗

BadRequestf writes the json-encoded message with a bad request status code.

(ctx context.Context, w http.ResponseWriter, format string, args ...interface{})

Source from the content-addressed store, hash-verified

55
56// BadRequestf writes the json-encoded message with a bad request status code.
57func BadRequestf(ctx context.Context, w http.ResponseWriter, format string, args ...interface{}) {
58 UserError(ctx, w, usererror.Newf(http.StatusBadRequest, format, args...))
59}
60
61// InternalError writes the json-encoded message for an internal error.
62func InternalError(ctx context.Context, w http.ResponseWriter) {

Callers 15

HandleUpdateFunction · 0.92
HandleCreateFunction · 0.92
HandleRevertFunction · 0.92
HandleCommentUpdateFunction · 0.92
HandleUpdateFunction · 0.92
HandleRestoreBranchFunction · 0.92
HandleReviewSubmitFunction · 0.92
HandleMergeFunction · 0.92
HandleFileViewAddFunction · 0.92
HandleReviewerAddFunction · 0.92
HandleCommentStatusFunction · 0.92

Calls 2

NewfFunction · 0.92
UserErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…