Skip to content

fix: pass unwrapped error to backoff/4 on bare :retry from compensate/4#306

Merged
jimsynz merged 1 commit intomainfrom
fix/consistent-backoff-error-unwrapping
Apr 6, 2026
Merged

fix: pass unwrapped error to backoff/4 on bare :retry from compensate/4#306
jimsynz merged 1 commit intomainfrom
fix/consistent-backoff-error-unwrapping

Conversation

@jimsynz
Copy link
Copy Markdown
Contributor

@jimsynz jimsynz commented Apr 6, 2026

Summary

  • When compensate/4 returns bare :retry, backoff/4 was receiving the RunStepError wrapper instead of the inner error. All other code paths pass the unwrapped error, so this was inconsistent and meant pattern matching on the error in backoff/4 wouldn't work as expected.
  • Tightened the existing test to assert backoff/4 receives the unwrapped error.

Closes #300, closes #301

Test plan

  • Existing test updated to assert unwrapped error is passed
  • Full test suite passes (331 tests, 8 doctests)
  • mix check --no-retry passes all 13 checks

…bare `:retry`

When `compensate/4` returns bare `:retry`, `backoff/4` was receiving the
`RunStepError` wrapper instead of the inner error. This was inconsistent
with all other code paths, where `backoff/4` receives the unwrapped error.
@jimsynz jimsynz merged commit 15ddc3d into main Apr 6, 2026
23 checks passed
@jimsynz jimsynz deleted the fix/consistent-backoff-error-unwrapping branch April 6, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant