Sha256: be3c9ba4b9ec5df905695b83352ba62b503684a96333394a581ec6cf1e9fe119

Contents?: true

Size: 649 Bytes

Versions: 2

Compression:

Stored size: 649 Bytes

Contents

class ApiAiWrapper::Errors

  module Request
    class UnsupportedParams < StandardError; end
  end

  module Engine
    class MissingTokens < StandardError
      def initialize(_message = "You have not set a developer or client token for this engine")
        @message = _message
      end
    end

    class MissingToken < StandardError
      def initialize(_message)
        @message = "Unauthorized call - #{_message}"
        @code = 401
      end
    end

    class ApiError < StandardError
      def initialize(_message, _code, _status)
        @message = _message
        @code = _code
        @status = _status
      end
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api_ai_wrapper-1.0.4 lib/api_ai_wrapper/errors.rb
api_ai_wrapper-1.0.0 lib/api_ai_wrapper/errors.rb