> For the complete documentation index, see [llms.txt](https://tetron.gitbook.io/tetron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tetron.gitbook.io/tetron/tetron.fun-troubleshooting.md).

# Tetron.fun - Troubleshooting

## Troubleshooting

This guide identifies frequent errors and operational issues you may encounter when using TetronFun, provides diagnostic steps, and outlines recommended resolutions.

### 1. Authentication & Authorization

| Error Code | Message      | Possible Cause                            | Resolution                                                                                                                             |
| ---------- | ------------ | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| 401        | Unauthorized | Invalid or expired API key/secret         | <p>• Verify key/secret values<br>• Regenerate credentials in dashboard<br>• Ensure clock skew is within tolerance</p>                  |
| 403        | Forbidden    | Insufficient scope for requested endpoint | <p>• Check API key scopes in <strong>Settings → API Keys</strong><br>• Update scopes or create a new key with required permissions</p> |

### 2. Rate Limiting

| Error Code | Message           | Possible Cause                              | Resolution                                                                                               |
| ---------- | ----------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| 429        | Too Many Requests | Exceeded per‑minute or per‑connection limit | <p>• Implement exponential backoff<br>• Batch RPC calls where possible<br>• Reduce polling frequency</p> |

### 3. Network & Connectivity

#### Symptoms

* Timeouts (`504 Gateway Timeout`)
* Connection refused or reset
* WebSocket disconnects immediately after auth

#### Diagnosis & Remedies

1. **Verify Endpoint URLs**\
   • Confirm you are using `https://rpc.tetronfun.com/<network>` or correct base URL for REST/WebSocket.
2. **Check Network Access**\
   • Ensure outbound HTTPS/WebSocket traffic is permitted by your firewall.
3. **TLS Handshake Failures**\
   • Update client TLS libraries to support TLS 1.2+.
4. **WebSocket Auth Sequence**\
   • Send the auth payload immediately upon `open` event.

### 4. SDK Installation & Compatibility

| Issue                            | Cause                                            | Resolution                                                                                                                                                     |
| -------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| “Module not found” on import     | Wrong package name or missing installation       | <p>• Confirm package name (<code>@tetronfun/sdk</code> or <code>tetronfun</code>)<br>• Re-install via <code>npm install</code> or <code>pip install</code></p> |
| Version conflicts or deprecation | Incompatible SDK version vs. runtime environment | <p>• Pin SDK version to match supported runtimes<br>• Upgrade Node or Python to supported versions</p>                                                         |

### 5. Transaction Submission Failures

#### Common Errors

* **400 Bad Request**\
  • Malformed JSON or missing required fields\
  • *Resolution*: Validate request schema against API Reference
* **422 Unprocessable Entity**\
  • Invalid parameter values (e.g. unsupported network or currency code)\
  • *Resolution*: Cross‑check `network`, `currency`, and address formats
* **500 Internal Server Error**\
  • Temporary backend issue\
  • *Resolution*: Retry with exponential backoff; if persistent, contact support

### 6. Interpreting Model Scores

#### Unexpected Scores

* **All-zero scores**\
  • May indicate input parsing failure or empty historical data\
  • *Resolution*: Confirm addresses exist on chain and transaction parameters are correct
* **Scores out of expected range**\
  • SDK version mismatch or API change\
  • *Resolution*: Upgrade to latest SDK and review response schema in API Reference

### 7. Logging & Diagnostics

* Enable verbose logging in SDK:
  * **JavaScript**:

    ```javascript
    const client = new TetronFun({ /* … */ , debug: true });
    ```
  * **Python**:

    ```python
    import logging
    logging.basicConfig(level=logging.DEBUG)
    client = TetronFun(/* … */)
    ```
* Review logs for request/response payloads, timestamps, and error stacks.

### 8. Contact & Escalation

If your issue persists after following the above steps:

1. Collect:
   * API key ID
   * Request timestamp and payload
   * Full response/error message
2. Submit a support ticket at **<support@tetronfun.com>** with the above details.
3. Reference the GitBook section “Troubleshooting” and include relevant log excerpts.

***

End of Troubleshooting guide. Continue to the **API Reference** for detailed endpoint specifications.
