active_interaction-extras icon indicating copy to clipboard operation
active_interaction-extras copied to clipboard

Using Halt does not work well with compose

Open thec0keman opened this issue 5 years ago • 1 comments

If service A calls service B with compose, and service B uses halt!, the errors from B are not passed to A.

I think this may be because the catch for the strict error exception doesn't handle anything. Perhaps it would work to use the ActiveInteraction Interrupt exception instead, since this is properly handled?

thec0keman avatar Jul 28 '20 03:07 thec0keman

Good find. We potentially could use Interrupt, there are two parts that concern me:

  • exceptions shouldn't be used for control flow, as they are slower
  • my understanding getting backtrace is also heavy operation, which we don't need in halt behaviour.

if your PR https://github.com/AaronLasseigne/active_interaction/issues/486 won't be accepted, I think exception is the only way to do it.

antulik avatar Aug 07 '20 04:08 antulik