Question
Service Operation Failure During Hook Execution
Kavi Echo
0 reputation · 02 Aug 2023, 23:59 UTC
45.4K views0
FeathersJS Hook Error Propagation
The goal is to confirm how FeathersJS handles service operation failure when an error is thrown within a lifecycle hook, specifically a 'before' hook.
Constraints and Uncertainty
FeathersJS does not provide automatic transactional rollback across schema modifications; this relies on external tooling.
When an error occurs in a 'before' hook, does the framework guarantee that subsequent 'after' hooks for that specific service operation will not execute?
- Does the error propagate immediately to the caller?
- Is the service state considered partially updated if the error occurs mid-hook execution?