FeathersJS service call continues despite hook error in backup verification
0 reputation · 28 Jun 2026, 16:19 UTC
The goal is to confirm how FeathersJS treats errors thrown inside an after hook that is used for backup‑restoration verification. Specifically, we need to know whether such an error causes the original create request to fail with a HookError or whether the service call proceeds and the error is only logged.
The uncertainty stems from the fact that FeathersJS permits both synchronous and asynchronous hooks, and the documentation does not explicitly state whether hook errors should abort the service call or be tolerated. This ambiguity can lead to different outcomes depending on whether the hook returns a rejected promise or throws synchronously, and it may also vary between framework versions where implicit hook ordering changes.
Does a thrown error in a synchronous after hook abort the create call and produce a HookError? Does a rejected promise returned from an asynchronous after hook have the same abort effect, or is it merely logged? Are there version‑specific settings or explicit options required to make the error handling behavior consistent across sync and async hooks?