MCPcopy Create free account
hub / github.com/juju/errors / NewBadRequest

Function NewBadRequest

errortypes.go:366–371  ·  view source on GitHub ↗

NewBadRequest returns an error which wraps err and satisfies Is(err, BadRequest) and the Locationer interface.

(err error, msg string)

Source from the content-addressed store, hash-verified

364// NewBadRequest returns an error which wraps err and satisfies
365// Is(err, BadRequest) and the Locationer interface.
366func NewBadRequest(err error, msg string) error {
367 return &errWithType{
368 error: newLocationError(wrapErrorWithMsg(err, msg), 1),
369 errType: BadRequest,
370 }
371}
372
373// Deprecated: IsBadRequest reports whether err is a BadRequest error.
374// Use Is(err, BadRequest)

Callers

nothing calls this directly

Calls 2

newLocationErrorFunction · 0.85
wrapErrorWithMsgFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…