Sha256: 3e76c0fd954d81eadb4dd894afaa5f82bbd9d9779a795f53180def7194a3d98d

Contents?: true

Size: 867 Bytes

Versions: 3

Compression:

Stored size: 867 Bytes

Contents

module GoogleMapsService
  module Error
    # Base error, capable of wrapping another
    class BaseError < StandardError
      attr_reader :response

      def initialize(response)
        @response = response
      end
    end

    # An exception that is raised if a redirect is required
    class RedirectError < BaseError
    end

    # A 4xx class HTTP error occurred.
    class ClientError < BaseError
    end

    # A 5xx class HTTP error occurred.
    class ServerError < BaseError
    end

    # An API error occured.
    class ApiError < BaseError
    end

    # Requiered query is missing
    class InvalidRequestError < ApiError
    end

    # Over quota.
    class RateLimitError < ApiError
    end

    # An unathorized error occurred. It might be caused by invalid key/secret or invalid access.
    class RequestDeniedError < ApiError
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
google_maps_service-0.3.0 lib/google_maps_service/errors.rb
google_maps_service-0.2.0 lib/google_maps_service/errors.rb
google_maps_service-0.1.0 lib/google_maps_service/errors.rb