Header menu logo FSharp.ATProto

XrpcError Type

Represents an error response from an XRPC endpoint. AT Protocol servers return JSON error bodies with optional error and message fields alongside an HTTP status code.

Common error codes include ExpiredToken (401), RateLimitExceeded (429), and InvalidRequest (400). The Xrpc module handles ExpiredToken and rate-limit errors automatically.

Record fields

Record Field Description

Error

Full Usage: Error

Field type: string option

The machine-readable error code from the response body (e.g. "ExpiredToken", "InvalidRequest"), or None if absent.

Field type: string option

Message

Full Usage: Message

Field type: string option

A human-readable error message from the response body, or None if absent.

Field type: string option

StatusCode

Full Usage: StatusCode

Field type: int

The HTTP status code returned by the server (e.g. 400, 401, 429, 500).

Field type: int

Type something to start searching.