Function: AdapterErrorHandlerMiddleware()
Function: AdapterErrorHandlerMiddleware()
function AdapterErrorHandlerMiddleware(context, next): Promise<IBlueprint>;
Middleware to add adapter error handlers to the blueprint.
This middleware identifies modules marked as adapter error handlers and adds them to the blueprint's list of adapter.errorhandlers.
Note: User defined error handlers take precedence over built-in and third-party error handlers. So the users can override the default error handlers.
Parameters
context
BlueprintContext<IBlueprint, ClassType>
The configuration context containing modules and blueprint.
next
NextPipe<BlueprintContext<IBlueprint, ClassType>, IBlueprint>
The next function in the pipeline.
Returns
Promise<IBlueprint>
The updated blueprint.
Example
AdapterErrorHandlerMiddleware({ modules, blueprint }, next);
