Build an error Response from an error, preserving HttpError details and headers.
The error that was thrown
The request context
Optional
Optional CORS configuration
Optional context for resolving dynamic CORS origins
An error Response
Build an error Response from an error, preserving HttpError details and headers.