# NetworkMismatchError

> An algod node is connected to a different network than the one requested.

```python
from x402_algorand import NetworkMismatchError
```

```python
class NetworkMismatchError(NetworkError)
```

An algod node is connected to a different network than the one requested.

## Examples

```python
import os

from algosdk.v2client.algod import AlgodClient
from x402_algorand import ALGORAND_MAINNET_CAIP2, NetworkMismatchError, ServerAvmSigner

local = AlgodClient("a" * 64, "http://localhost:4001")  # a LocalNet node
signer = ServerAvmSigner.from_mnemonic(os.environ["FACILITATOR_MNEMONIC"], local)
try:
    signer.algod_for(ALGORAND_MAINNET_CAIP2)  # the node is not on MainNet
except NetworkMismatchError as e:
    print(e)  # algod is on algorand:... but the request is for algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k
```

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

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