V5 keeps backwards compatibility of the error hooks.
System configuration
Module versions:
@feathersjs/feathers@5.0.4
Notes
Do you think this is worth fixing, or shall we work around it? I think the idea was to not break backwards compatibility for now. And generically, my expectation for an error[method] hook was that it will always be called for that method regardless of how other hooks are set up or where errors are thrown. Our specific issue is that we start some transactions in a before.all hook, but then if the before.all hook chain throws, the error.method specific transaction cleanup never happens.
Steps to reproduce
If a service has the following hooks:
In V4 it outputs:
In V5 the error.create hook is never called.
Expected behavior
V5 keeps backwards compatibility of the error hooks.
System configuration
Module versions: @feathersjs/feathers@5.0.4
Notes
Do you think this is worth fixing, or shall we work around it? I think the idea was to not break backwards compatibility for now. And generically, my expectation for an error[method] hook was that it will always be called for that method regardless of how other hooks are set up or where errors are thrown. Our specific issue is that we start some transactions in a before.all hook, but then if the before.all hook chain throws, the error.method specific transaction cleanup never happens.