Skip to content
  • sdk
  • cli

Upgrading to samva 0.6: four changes to check

The 0.6 SDK renames a few status values and tightens error and webhook handling. Here are the four changes that can break existing code.

Most apps need only a quick search before upgrading. Check these four things.

What you need to do

  1. Error handling. Branch on an error's _tag. The operation field is gone.
  2. Failed handoffs. A send Samva can't hand off now returns a 503 DeliveryUnavailableError with retryAfterSeconds. Nothing was sent, so retry with the same key.
  3. Status values. A few domain and delivery states are renamed, for example provider-setup is now provisioning. Search your code for the old names.
  4. Webhook headers. readWebhookHeaders now throws when a signing header is missing, so remove any ?? "" fallbacks.

The full list of renamed values is in the package changelog.