When onMaxAttempts: 'kill' is set, the invocation fails with the last error after exhausting all retry attempts. This can be confusing, especially if the error wasn't caused by a Restate command. Instead, we should throw a standard "killed" error (so the UI can also indicate the invocation was killed) and attach the last retry error as its cause.
Alternatively, we can push a kill event to sys_journal_events, with the killed error. so in the UI we can show "killed after" in the UI
When
onMaxAttempts: 'kill'is set, the invocation fails with the last error after exhausting all retry attempts. This can be confusing, especially if the error wasn't caused by a Restate command. Instead, we should throw a standard "killed" error (so the UI can also indicate the invocation was killed) and attach the last retry error as itscause.Alternatively, we can push a kill event to sys_journal_events, with the killed error. so in the UI we can show "killed after" in the UI