Event handlers should be able to abort Plan execution on error
Opened this issue · 0 comments
vcschapp commented
Currently httpx blindly continues the Plan
execution after running the handler chain for a given event, e.g. BeforeAttempt
.
This is naïve, because it assumes a handler can't run into an error itself, which is clearly wrong. A handler experiencing an error might theoretically want to/need to abort the Plan
execution.
Handlers should be able to populate the value of Execution.Err
and:
- If it is non-
nil
after a specific handler, the handler chain execution should possibly stop. [Validate if this makes sense.] - If it is non-
nil
after a handler chain, thePlan
execution should probably stop and the execution should fail.