# SimulationError

> An algod `simulate` call reported that the transaction group would fail.

```python
from x402_algorand import SimulationError
```

```python
class SimulationError(X402AlgorandError, RuntimeError)
```

An algod `simulate` call reported that the transaction group would fail.

## Examples

```python
from x402_algorand import SimulationError

# Raised by ServerAvmSigner.simulate_group() when algod's simulate reports a failure.
# The facilitator catches it and returns invalid_reason="transaction_simulation_failed".
try:
    signer.simulate_group(group_bytes, network)
except SimulationError as e:  # also a RuntimeError
    print("would fail on chain:", e)
```

Source: [x402_algorand/errors.py](https://github.com/x402-avm/x402-algorand/blob/main/x402_algorand/errors.py#L47)

Source: https://x402-avm.github.io/reference/python/x402-algorand/simulation-error
