> ## 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

- [Robot](/python-api/robot-interface/robot.md)
- [Wheeled](/python-api/robot-interface/wheeled.md)
- [Arm](/python-api/robot-interface/arm.md)
- [Component](/python-api/robot-interface/component.md)
- [Hand](/python-api/robot-interface/hand.md)
