Appearance
Error Handler
High level handler that catches any exception thrown by the other handlers. When the error thrown is a ResponseError
then this is mapped to the corresponding status code and message. Otherwise, a generic 500 status code is returned.
typescript
type handlers = {
ErrorHandler: {
handle(args: { error: Error, context: Context}): Promise<Response>
}
}