MCPcopy
hub / github.com/rilldata/rill / Errorf

Function Errorf

runtime/pkg/httputil/httputil.go:30–35  ·  view source on GitHub ↗

Errorf creates a new HTTP error with a status code and formatted message message.

(statusCode int, format string, args ...interface{})

Source from the content-addressed store, hash-verified

28
29// Errorf creates a new HTTP error with a status code and formatted message message.
30func Errorf(statusCode int, format string, args ...interface{}) error {
31 return HTTPError{
32 StatusCode: statusCode,
33 Err: fmt.Errorf(format, args...),
34 }
35}
36
37// HTTPError represents an error with a HTTP status code.
38type HTTPError struct {

Callers 7

apiHandlerMethod · 0.92
combinedOpenAPISpecMethod · 0.92
assetsHandlerMethod · 0.92
assetHandlerMethod · 0.92
handleWebhookMethod · 0.92
handleWebhookMethod · 0.92

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected