Sha256: c540fe068b55faa9721e532baf6b9b99164ff79b15a6abcac75842a552509717

Contents?: true

Size: 643 Bytes

Versions: 5

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

module WebPush
  class Error < RuntimeError; end

  class ConfigurationError < Error; end

  class ResponseError < Error
    attr_reader :response, :host

    def initialize(response, host)
      @response = response
      @host = host
      super "host: #{host}, #{@response.inspect}\nbody:\n#{@response.body}"
    end
  end

  class InvalidSubscription < ResponseError; end

  class ExpiredSubscription < ResponseError; end

  class Unauthorized < ResponseError; end

  class PayloadTooLarge < ResponseError; end

  class TooManyRequests < ResponseError; end

  class PushServiceError < ResponseError; end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
web-push-3.0.1 lib/web_push/errors.rb
web-push-3.0.0 lib/web_push/errors.rb
web-push-2.1.0 lib/web_push/errors.rb
web-push-2.0.0 lib/web_push/errors.rb
web-push-1.0.0 lib/web_push/errors.rb