Error hooks - re-throwing vs assigning context.error
KidkArolis opened this issue · comments
The behaviour of throwing in an error hook changed slightly from V4->V5.
If an error hook modifies context.error
- that's all fine, the context is now updated and the error is re-thrown in regular.ts.
But if an error hook throws an error, that does not update context.error
like it used to.
Perhaps this here should .catch(error => { context.error = error; throw context.error })
hooks/main/hooks/src/regular.ts
Lines 52 to 56 in 2490de6