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

# RPC Configuration and Errors

> Handle API-scoped RPC configuration, token refresh, and structured Altude errors.

## API-scoped RPC configuration

The SDK obtains blockchain node configuration from:

```text theme={null}
GET /api/transaction/config
X-API-Key: <your API key>
```

The API key selects the tenant and cluster. `RpcUrl`, `Token`, `TokenExpiration`, and `FeePayer` must be treated as one configuration unit.

The SDK rejects missing values, unsupported URL protocols, and fallback values such as `jwt_unavailable`. It never silently switches to a public Solana endpoint.

## Handle structured errors

```typescript theme={null}
import { AltudeError } from '@altude/core'

try {
  await gasStation.init()
} catch (error) {
  if (error instanceof AltudeError) {
    console.error(error.code)
    console.error(error.message)
    console.error(error.remediation)
  } else {
    throw error
  }
}
```

Common network error codes:

| Code          | Meaning                                                          |
| ------------- | ---------------------------------------------------------------- |
| `RPC_ERROR`   | RPC URL or JWT configuration is missing, invalid, or unavailable |
| `RELAY_ERROR` | The Altude relay rejected a request or could not be reached      |

## Force a refresh

Refresh cached transaction configuration when directed by Altude support or after changing API-key cluster configuration:

```typescript theme={null}
const config = await gasStation.getConfig(true)
```

## Retry behavior

* Safe network reads may be retried by the HTTP client.
* Configuration is refreshed near JWT expiration.
* Relay submissions are not automatically repeated after an ambiguous failure.

<Warning>
  Do not implement an unconditional retry around transaction submission. A request may have reached the relay even when the client did not receive its response.
</Warning>
