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

Function newRequestTimeoutError

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

Source from the content-addressed store, hash-verified

77}
78
79func newRequestTimeoutError(after time.Duration) errctx.Error {
80 return RequestTimeoutError{errctx.NewTextError(
81 fmt.Sprintf("Request was timed out after %v", after),
82 1,
83 errctx.WithStatusCode(http.StatusServiceUnavailable),
84 errctx.WithPublicMessage("Timeout"),
85 errctx.WithShouldReport(false),
86 )}
87}
88
89func (e RequestTimeoutError) Unwrap() error {
90 return context.DeadlineExceeded

Callers 1

CheckTimeoutFunction · 0.70

Calls 4

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

Tested by

no test coverage detected