> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# RobotFault

> A robot controller reported a fault while executing a command

```python theme={null}
from grid_types import RobotFault
```

A robot controller reported a fault while executing a command.

The form-factor-agnostic controller-fault exception. Vendor drivers
subclass it (e.g. the FANUC drivers' `FanucFault`) and may attach vendor
attributes; callers that want fault-aware recovery catch `RobotFault` and
branch only on `recoverable`, never on vendor specifics::

try:
arm.followJointTrajectory(...)
except RobotFault as fault:
if fault.recoverable:
arm.reset()  # then retry
else:
raise  # fatal — needs human intervention

Severity is the universal contract: every robot can say whether a software
recovery attempt is worth making. Vendor alarm codes are optional metadata —
many controllers expose none, so no driver must populate them, and
robot-agnostic code must treat them as opaque display strings rather than
branching on their content.

Carries explicit typed fields rather than being a `@dataclass`: it has to
stay raisable and catchable by existing `except RuntimeError` handlers,
and a dataclass-generated `__init__` would not pass `message` through to
`RuntimeError` (so `str(fault)` would lose it).

## Fields

<ResponseField name="message">
  The fault description (see Args).
</ResponseField>

<ResponseField name="recoverable">
  The recovery hint (see Args).
</ResponseField>

<ResponseField name="codes">
  The vendor alarm codes, empty when none were available.
</ResponseField>

## Constructor

```python Signature theme={null}
RobotFault(message: str, *, recoverable: bool = True, codes: Optional[List[str]] = None)
```


## Related topics

- [Flexiv Rizon Arm](/v2.2/python-api/flexiv-rizon/flexivrizon.md)
- [grid-types](/v2.2/python-api/grid-types/overview.md)
- [Fanuc CRX-30iA Arm](/v2.2/python-api/fanuccrx30/fanuccrx30.md)
- [Fanuc LR Mate 200iD Arm](/v2.2/python-api/fanuclrmate200id/fanuclrmate200id.md)
- [Robot](/v2.2/python-api/robot-interface/robot.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.