# Error Codes

### Error Handling<br>

#### Validation Errors (400)

**Invalid Messages**

```json
{
  "status": "error",
  "message": "Invalid request. Messages array is required."
}
```

**Invalid Chain**

```json
{
  "status": "error",
  "message": "Invalid chain. Supported chains are: base, polygon, avalanche, solana"
}
```

**Invalid Wallet Address**

```json
{
  "status": "error",
  "message": "Invalid wallet address format for base. Expected EVM (0x...) address."
}
```

#### Not Found Errors (404)

```json
{
  "status": "error",
  "message": "Operation not found"
}
```

#### Payment Errors (402)

```json
{
  "x402Version": 1,
  "error": "Token payment required",
  "accepts": [
    {
      /* payment config */
    }
  ]
}
```

#### Payment Verification Failure (400)

```json
{
  "status": "error",
  "message": "Payment verification failed",
  "error": "Invalid payment proof"
}
```

#### Server Errors (500)

```json
{
  "status": "error",
  "message": "Internal server error while processing query."
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hashhunter.ai/hash-hunter-x402-endpoint/error-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
