PtcLlmHttp.Error (PtcLlmHttp v0.1.0)

Copy Markdown View Source

Closed, redacted failure facts returned by PtcLlmHttp.

Errors contain only package vocabulary. They never retain endpoint values, credentials, request or response bodies, provider text, or raw exit reasons. contract/0 is the versioned data projection consumers use for exhaustive mapping.

Summary

Functions

Returns the versioned, data-only error mapping contract.

Types

dispatch()

@type dispatch() :: :not_sent | :possibly_sent | :completed

kind()

@type kind() ::
  :invalid_target
  | :invalid_request
  | :invalid_credential
  | :unsupported_capability
  | :capacity_exhausted
  | :runtime_unavailable
  | :deadline_exceeded
  | :resource_limit_exceeded
  | :callback_failed
  | :internal_failure
  | :dns_failure
  | :address_rejected
  | :connect_failure
  | :tls_failure
  | :connection_closed
  | :malformed_http
  | :response_too_large
  | :unsupported_redirect
  | :unsupported_content_encoding
  | :unsupported_transfer_encoding
  | :unsupported_framing
  | :http_status
  | :malformed_provider_response
  | :provider_result_too_large
  | :model_refusal
  | :malformed_stream
  | :stream_too_large
  | :invalid_tool_arguments

phase()

@type phase() ::
  :validate
  | :encode
  | :admission
  | :dns
  | :connect
  | :tls
  | :send
  | :receive_head
  | :receive_body
  | :stream
  | :decode

scope()

@type scope() :: :request | :credential | :capacity | :transport | :provider | :model

t()

@opaque t()

Functions

contract()

@spec contract() :: map()

Returns the versioned, data-only error mapping contract.