retrysafe
← All rules

order-dependence-assumed

info

The handler sets state from several event types without checking a version or timestamp.

Why it goes wrong

Webhooks are not delivered in order. A delayed 'subscription.updated' can arrive after 'subscription.deleted' and resurrect the subscription.

Safe pattern

Store the event's timestamp or version with the state and ignore events older than what is stored, or fetch the current object from the provider before writing.

Configure

// retrysafe.config.ts
export default defineConfig({
  rules: { "order-dependence-assumed": "info" }, // or "off"
});

// or, for one line (a reason is required):
// retrysafe-ignore order-dependence-assumed -- <why this is safe>