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

Function newRequestCancelledError

server/errors.go:65–73  ·  view source on GitHub ↗
(after time.Duration)

Source from the content-addressed store, hash-verified

63}
64
65func newRequestCancelledError(after time.Duration) errctx.Error {
66 return RequestCancelledError{errctx.NewTextError(
67 fmt.Sprintf("Request was cancelled after %v", after),
68 1,
69 errctx.WithStatusCode(499),
70 errctx.WithPublicMessage("Cancelled"),
71 errctx.WithShouldReport(false),
72 )}
73}
74
75func (e RequestCancelledError) Unwrap() error {
76 return context.Canceled

Callers 1

CheckTimeoutFunction · 0.85

Calls 4

NewTextErrorFunction · 0.92
WithStatusCodeFunction · 0.92
WithPublicMessageFunction · 0.92
WithShouldReportFunction · 0.92

Tested by

no test coverage detected