integreat-io / integreat

Node.js integration layer
Other
13 stars 3 forks source link

Provide the default break on error behaviour as post-condition – under a feature flag #330

Closed kjellmorten closed 7 months ago

kjellmorten commented 7 months ago

When a job step fails, the default behaviour is to break and return the error. This is right now implemented as the default pre-condition on the next step, and is a bit counter-intuitive. Also, an actual pre-condition will override this default, and allow errors, unless the defined conditions address errors in some way.

Verifying the step response and the default behaviour of breaking on error, should be moved to the post-conditions of a step. As this is a breaking change, we'll add it behind the feature flag breakByDefault. This will also change the default of the break flag to true.

By setting this feature flag to true, pre-conditions will no longer override the break on error default, but specifying post-conditions will. This is probably closer to what one would expect.