Sha256: 2a71c953e5c4efb0b8f2a7b5b942e4f4918ea26dde8bc7d5a2c727a769f4591f

Contents?: true

Size: 760 Bytes

Versions: 32

Compression:

Stored size: 760 Bytes

Contents

module Her
  module Errors
    class PathError < StandardError
      attr_reader :missing_parameter

      def initialize(message, missing_parameter=nil)
        super(message)
        @missing_parameter = missing_parameter
      end
    end

    class AssociationUnknownError < StandardError
    end

    class ResponseError < StandardError
      def self.for(status_code)
        case status_code
          when 404
            RecordNotFound
          when 422
            RecordInvalid
          else
            self
        end
      end
    end

    class ParseError < ResponseError
    end

    class RemoteServerError < ResponseError
    end

    class RecordNotFound < ResponseError
    end

    class RecordInvalid < ResponseError
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
test_track_rails_client-4.0.0.alpha12 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha11 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha10 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha9 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha8 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha7 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha6 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha5 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha4 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha3 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha2 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-4.0.0.alpha1 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-3.0.1 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-3.0.0 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-2.0.0 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-1.3.0 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-1.2.0 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-1.1.0 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-1.0.0 vendor/gems/her/lib/her/errors.rb
test_track_rails_client-0.9.20 vendor/gems/her/lib/her/errors.rb