Sha256: d65b820e783de84bfc08783170873d21c50403bb6102ae7abfc7ea5c6768fcbf

Contents?: true

Size: 383 Bytes

Versions: 8

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

module Concourse
  module Errors
    class ApiError < StandardError
      def initialize(parameters)
        @request = parameters[:request]
        @response = parameters[:response]

        super("Request to #{@request.url} failed " \
          "with status #{@response.status} " \
          "and body #{@response.body}")
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
concourse.rb-0.5.0.pre.8 lib/concourse/errors.rb
concourse.rb-0.5.0.pre.7 lib/concourse/errors.rb
concourse.rb-0.5.0.pre.6 lib/concourse/errors.rb
concourse.rb-0.5.0.pre.5 lib/concourse/errors.rb
concourse.rb-0.5.0.pre.4 lib/concourse/errors.rb
concourse.rb-0.5.0.pre.3 lib/concourse/errors.rb
concourse.rb-0.5.0.pre.2 lib/concourse/errors.rb
concourse.rb-0.5.0.pre.1 lib/concourse/errors.rb