MCPcopy
hub / github.com/pocketbase/pocketbase / NewNotFoundError

Function NewNotFoundError

tools/router/error.go:67–73  ·  view source on GitHub ↗

NewNotFoundError creates and returns 404 ApiError.

(message string, rawErrData any)

Source from the content-addressed store, hash-verified

65
66// NewNotFoundError creates and returns 404 ApiError.
67func NewNotFoundError(message string, rawErrData any) *ApiError {
68 if message == "" {
69 message = "The requested resource wasn't found."
70 }
71
72 return NewApiError(http.StatusNotFound, message, rawErrData)
73}
74
75// NewBadRequestError creates and returns 400 ApiError.
76func NewBadRequestError(message string, rawErrData any) *ApiError {

Callers 6

TestNewNotFoundErrorFunction · 0.92
NewNotFoundErrorFunction · 0.92
BuildMuxMethod · 0.70
event.goFile · 0.70
NotFoundErrorMethod · 0.70
ToApiErrorFunction · 0.70

Calls 1

NewApiErrorFunction · 0.70

Tested by 1

TestNewNotFoundErrorFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…