Sha256: 1056e4f69a84b8b9bb024140f182cfb9f53e18382bee6f224f78468b9f943a01

Contents?: true

Size: 550 Bytes

Versions: 58

Compression:

Stored size: 550 Bytes

Contents

module Rpush
  class RetryableError < StandardError
    attr_reader :code, :description, :response

    def initialize(code, notification_id, description, response)
      @code = code
      @notification_id = notification_id
      @description = description
      @response = response
    end

    def to_s
      message
    end

    def message
      "Retryable error for #{@notification_id}, received error #{@code} (#{@description}) - retry after #{@response.header['retry-after']}"
    end
  end

  class RateLimitError < RetryableError; end
end

Version data entries

58 entries across 58 versions & 2 rubygems

Version Path
rpush-9.2.0 lib/rpush/daemon/retryable_error.rb
rpush-9.1.0 lib/rpush/daemon/retryable_error.rb
rpush-9.0.0 lib/rpush/daemon/retryable_error.rb
rpush-8.0.0 lib/rpush/daemon/retryable_error.rb
rpush-7.0.1 lib/rpush/daemon/retryable_error.rb
rpush-7.0.0 lib/rpush/daemon/retryable_error.rb
rpush-6.0.1 lib/rpush/daemon/retryable_error.rb
rpush-6.0.0 lib/rpush/daemon/retryable_error.rb
rpush-5.4.0 lib/rpush/daemon/retryable_error.rb
rpush-5.3.0 lib/rpush/daemon/retryable_error.rb
rpush-5.2.0 lib/rpush/daemon/retryable_error.rb
rpush-5.1.0 lib/rpush/daemon/retryable_error.rb
rpush-5.0.0 lib/rpush/daemon/retryable_error.rb
rpush-4.2.0 lib/rpush/daemon/retryable_error.rb
rpush-4.1.1 lib/rpush/daemon/retryable_error.rb
rpush-4.1.0 lib/rpush/daemon/retryable_error.rb
rpush-4.0.1 lib/rpush/daemon/retryable_error.rb
rpush-4.0.0 lib/rpush/daemon/retryable_error.rb
rpush-3.3.1 lib/rpush/daemon/retryable_error.rb
rpush-3.3.0 lib/rpush/daemon/retryable_error.rb