Sha256: ac6c04f94662562b5ee63436b16381b1fabca3fa4f8f91a75ed6e166da836499

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

module Cohere
  module Errors
    class CohereError < StandardError
      def initialize(message = nil)
        super(message)
      end
    end

    class MissingAPIKeyError < CohereError; end
    class BlockWithoutServerSentEventsError < CohereError; end

    class RequestError < CohereError
      attr_reader :request, :payload

      def initialize(message = nil, request: nil, payload: nil)
        @request = request
        @payload = payload

        super(message)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cohere-ai-1.0.0 components/errors.rb