A function that formats a thrown error into a serializable error body.
The thrown error (an HttpError or a generic Error)
HttpError
Error
Optional
Optional request context (used for instance, logging, etc.)
instance
The formatted error body
0.1.0
A function that formats a thrown error into a serializable error body.