ParmanaHttpError Objects
ValidationError Objects
AuthenticationError Objects
AuthorizationError Objects
server_code/message if needed, not via
type():
- a caller asserting an authority.principalId it isn’t permitted to
assert (isPrincipalAllowed, packages/api/src/routes/execute.ts and
transactions.ts) — carries no
codefield of its own. - a caller invoking a capability (intent.action) it isn’t permitted
to invoke (isCapabilityAllowed.ts) — carries
code: "CAPABILITY_NOT_ALLOWED", preserved onserver_codebelow.
ExecutionRejectedError Objects
code field at all; and a
capability-scoping denial, code: "CAPABILITY_NOT_ALLOWED") — see
build_http_error’s POLICY_DENIED check, which runs ahead of the
generic status-based mapping for exactly this reason.
Previously reached over HTTP 500, code RUNTIME_ERROR (no dedicated
status of its own). That gap was fixed at the source; this class and
build_http_error were updated to match the current shape, not kept
around to work around the old ambiguity — mirroring
typescript/src/transport/mapHttpErrorResponse.ts’s own documented
history of the identical change.
NotFoundError Objects
ConflictError Objects
RateLimitError Objects
retry_after_seconds (parsed from the response’s Retry-After
header, when present) is exposed for callers that want to honor the
Runtime’s own hint rather than guess a delay.
InternalServerError Objects
7, typescript/src/errors/InternalServerError.ts); ServerError below
is a backward-compatible alias of this class.
ServerError
Backward-compatible alias — this class was previously named ServerError. Existingexcept ServerError / isinstance(e, ServerError)
code keeps working unchanged.
build_http_error
code used to
distinguish the cases that need it. This API returns THREE distinct
403 shapes, not two — a fact this docstring previously got wrong:
code: "POLICY_DENIED"— a policy REJECTED decision, mapped to ExecutionRejectedError, checked first since it needs a wholly different SDK exception.code: "CAPABILITY_NOT_ALLOWED"— a caller invoking a capability it isn’t permitted to invoke (isCapabilityAllowed.ts). Checked explicitly (not left to fall through the generic status-map lookup below) so itscodeis preserved on AuthorizationError.server_code instead of being silently dropped.- no
codeat all — a caller asserting an authority.principalId it isn’t permitted to assert (isPrincipalAllowed.ts, packages/api/src/routes/execute.ts and transactions.ts). Also maps to AuthorizationError, via the generic status-map lookup below.
retry_after_seconds through to RateLimitError —
mirrors typescript/src/transport/mapHttpErrorResponse.ts’s identical,
identically-ordered checks exactly.