MCPcopy
hub / github.com/lxc/incus / StatusErrorf

Function StatusErrorf

shared/api/error.go:11–23  ·  view source on GitHub ↗

StatusErrorf returns a new StatusError containing the specified status and message.

(status int, format string, a ...any)

Source from the content-addressed store, hash-verified

9
10// StatusErrorf returns a new StatusError containing the specified status and message.
11func StatusErrorf(status int, format string, a ...any) StatusError {
12 var msg string
13 if len(a) > 0 {
14 msg = fmt.Sprintf(format, a...)
15 } else {
16 msg = format
17 }
18
19 return StatusError{
20 status: status,
21 msg: msg,
22 }
23}
24
25// StatusError error type that contains an HTTP status code and message.
26type StatusError struct {

Callers 15

incusParseResponseFunction · 0.92
CheckPermissionMethod · 0.92
GetPermissionCheckerMethod · 0.92
CheckPermissionMethod · 0.92
GetPermissionCheckerMethod · 0.92
CheckPermissionMethod · 0.92
GetPermissionCheckerMethod · 0.92
certificateDetailsMethod · 0.92
CheckTargetMemberFunction · 0.92
CheckTargetGroupFunction · 0.92
ForwardCreateMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…