MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Error

Interface Error

errctx/error.go:8–35  ·  view source on GitHub ↗

Error is an interface for errors that carry additional context information.

Source from the content-addressed store, hash-verified

6
7// Error is an interface for errors that carry additional context information.
8type Error interface {
9 // Error returns the error message.
10 Error() string
11
12 // StatusCode returns the HTTP status code associated with the error.
13 StatusCode() int
14 // PublicMessage returns the public message associated with the error.
15 PublicMessage() string
16 // ShouldReport indicates whether the error should be reported.
17 ShouldReport() bool
18 // DocsURL returns the documentation URL associated with the error.
19 DocsURL() string
20
21 // StackTrace returns the stack trace associated with the error.
22 // This method is traditionally used to retrieve the stack trace
23 // by packages like error reporters.
24 StackTrace() []uintptr
25 // Callers returns the stack trace associated with the error.
26 // This method is traditionally used to retrieve the stack trace
27 // by packages like error reporters.
28 Callers() []uintptr
29 // FormatStack returns the stack trace as a formatted string.
30 FormatStack() string
31
32 // CloneErrorContext returns a copy of the error context
33 // with applied options.
34 CloneErrorContext(opts ...Option) *ErrorContext
35}
36
37// ErrorType returns the type name of the given error.
38// If the error is [WrappedError], it returns the type of the inner error.

Callers 31

SendMethod · 0.65
TestVerifySourceNetworkFunction · 0.65
appendJSONMarshalMethod · 0.65
appendAnyMethod · 0.65
logGLibFunction · 0.65
handleDownloadErrorMethod · 0.65
LogResponseFunction · 0.65
WithReportErrorMethod · 0.65
generateErrorHTMLFunction · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected