Skip to content

[Features] Automatically retry requests on network errors #16

@ousmanedev

Description

@ousmanedev

Enable automatic retries on requests that fail due to a transient problem by configuring the maximum number of retries:

Global configuration

MagicBell.configure do |config|
  config.api_key = 'MAGICBELL_API_KEY'
  config.api_secret = 'MAGICBELL_API_SECRET'
  config.max_network_retries = 2
end

Per-request configuration

  magicbell = MagicBell::Client.new
  magicbell.max_network_retries = 2

Request example

# If the first request doesn't succeed, it will get retried twice

magicbell.create_notification(
  title: 'Rob assigned a task to you',
  recipients: [{
    external_id: 'DATABASE_ID'
  }]
)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions