Sha256: 65e64055beaccabbab6294f611f7f1d58ebd54c59e72cb43542aece4a1467b7c

Contents?: true

Size: 504 Bytes

Versions: 3

Compression:

Stored size: 504 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
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rpush-2.0.0.beta1 lib/rpush/daemon/retryable_error.rb
rpush-1.0.0-java lib/rpush/daemon/retryable_error.rb
rpush-1.0.0 lib/rpush/daemon/retryable_error.rb