MCPcopy
hub / github.com/harness/harness / Format

Function Format

errors/status.go:123–129  ·  view source on GitHub ↗

Format is a helper function to return an Error with a given status and formatted message.

(code Status, format string, args ...interface{})

Source from the content-addressed store, hash-verified

121
122// Format is a helper function to return an Error with a given status and formatted message.
123func Format(code Status, format string, args ...interface{}) *Error {
124 msg := fmt.Sprintf(format, args...)
125 return &Error{
126 Status: code,
127 Message: msg,
128 }
129}
130
131// NotFound is a helper function to return an not found Error.
132func NotFound(format string, args ...interface{}) *Error {

Callers 9

NotFoundFunction · 0.70
InvalidArgumentFunction · 0.70
InternalFunction · 0.70
ConflictFunction · 0.70
PreconditionFailedFunction · 0.70
UnauthorizedFunction · 0.70
ForbiddenFunction · 0.70
FailedFunction · 0.70
AbortedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…