ErrorHandlerStrategy
This strategy defines logic for handling errors thrown during on both the server and the worker. It can be used for additional logging & monitoring, or for sending error reports to external services.
Info
This is configured via the systemOptions.errorHandlers property of
your VendureConfig.
Example
- Extends:
InjectableStrategy
handleServerError
method
(exception: Error, context: { host: ArgumentsHost }) => void | Promise<void>This method will be invoked for any error thrown during the execution of the server.
handleWorkerError
method
(exception: Error, context: { job: Job }) => void | Promise<void>This method will be invoked for any error thrown during the execution of a job on the worker.
Was this chapter helpful?