Sha256: b49cb38befb7312446638ef91a3d8fcb44666e21bf98e1f9c47e4f749536d5e5

Contents?: true

Size: 798 Bytes

Versions: 11

Compression:

Stored size: 798 Bytes

Contents

module Heroku
  class API
    module Errors
      class Error < StandardError; end

      class ErrorWithResponse < Error
        attr_reader :response

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

      class Unauthorized < ErrorWithResponse; end
      class VerificationRequired < ErrorWithResponse; end
      class Forbidden < ErrorWithResponse; end
      class NotFound < ErrorWithResponse; end
      class Timeout < ErrorWithResponse; end
      class Locked < ErrorWithResponse; end
      class RateLimitExceeded < ErrorWithResponse; end
      class RequestFailed < ErrorWithResponse; end
      class NilApp < ErrorWithResponse; end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
heroku-api-0.4.3 lib/heroku/api/errors.rb
heroku-api-0.4.2 lib/heroku/api/errors.rb
heroku-api-0.4.1 lib/heroku/api/errors.rb
heroku-api-0.4.0 lib/heroku/api/errors.rb
heroku-api-0.3.23 lib/heroku/api/errors.rb
heroku-api-0.3.22 lib/heroku/api/errors.rb
heroku-api-0.3.21 lib/heroku/api/errors.rb
heroku-api-0.3.20 lib/heroku/api/errors.rb
heroku-api-0.3.19 lib/heroku/api/errors.rb
heroku-api-0.3.18 lib/heroku/api/errors.rb
heroku-api-0.3.17 lib/heroku/api/errors.rb