// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ApiErrorCode } from "./ApiErrorCode";

/**
 * Canonical error envelope returned on non-2xx responses from every
 * TrustLoopGuard endpoint. SDKs deserialize this body to produce typed
 * errors; integrators don't have to inspect status codes by hand.
 *
 * The shape is intentionally minimal — `code` drives SDK-side fan-out,
 * `message` is for logs, `retriable` tells callers whether the same
 * request may be retried, and `details` is opaque so the server can
 * add validation field paths without breaking SDKs.
 */
export type ApiError = { code: ApiErrorCode, message: string,
/**
 * Whether the caller may retry the same request without modification.
 * SDKs honor `Retry-After` when present in addition to this flag.
 */
retriable: boolean,
/**
 * Opaque structured details (e.g. validation field path).
 * Defaults to `null`; servers may add fields without breaking SDKs.
 */
details: Record<string, unknown> | null, };
