MCPcopy Create free account
hub / github.com/gotenberg/gotenberg / WrapError

Function WrapError

pkg/modules/api/errors.go:64–69  ·  view source on GitHub ↗

WrapError wraps the given error with a [SentinelHttpError]. The wrapped error will be displayed in a log, while the [SentinelHttpError] will be sent in the response. return api.WrapError( // This first error will be logged. fmt.Errorf("my action: %w", err), // The HTTP error will be sent

(err error, sentinel SentinelHttpError)

Source from the content-addressed store, hash-verified

62// ),
63// )
64func WrapError(err error, sentinel SentinelHttpError) error {
65 return sentinelWrappedError{
66 error: err,
67 sentinel: sentinel,
68 }
69}
70
71// Interface guards.
72var (

Callers 15

ValidatePdfFormatsCompatFunction · 0.92
ValidateFacturXCompatFunction · 0.92
ValidatePdfEncryptCompatFunction · 0.92
EnsureStampFileFunction · 0.92
EnsureWatermarkFileFunction · 0.92
convertRouteFunction · 0.92
encryptRouteFunction · 0.92
facturXRouteFunction · 0.92
rejectFileSchemeFunction · 0.92
markdownToHtmlFunction · 0.92
convertUrlFunction · 0.92
handleChromiumErrorFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestWrapErrorFunction · 0.68