# Error Formatting (/docs/guides/errors/error-formatting) 

# 🧾 API Error Response Format [#-api-error-response-format]

The Hands In Merchant API uses standard HTTP status codes and structured error objects to help you identify and troubleshoot problems effectively.

All errors follow a consistent format to make it easier to understand what went wrong and how to resolve the issue. This consistency also helps with logging, alerting, and integration with monitoring tools.

## 📦 Error Object Structure [#-error-object-structure]

Each error response contains an `error` object with several useful fields:

```json
{
  "error": {
    "http_status_code": 422,
    "name": "INVALID_FIELD",
    "detail": "The following fields have errors requestBody.amountMoney",
    "moreInfo": "Help is available at tech@handsin.com",
    "instance": "group-payments",
    "problems": {
      "requestBody.amountMoney": {
        "message": "amountMoney' is required"
      }
    }
  }
}
```

### 🔍 Field Descriptions [#-field-descriptions]

* `http_status_code`: The standard HTTP status code returned (e.g., 422, 500).
* `name`: A machine-readable error code name (e.g., `INVALID_FIELD`, `UNAUTHORIZED`).
* `detail`: Human-readable explanation of the issue.
* `moreInfo`: Optional support or contact message.
* `instance`: Identifies the service or endpoint that generated the error.
* `problems`: Optional breakdown of field-specific issues when validation fails.
