JSON Error Object Conventions
{
"error": {
"code": "USER_NOT_FOUND",
"message": "User not found",
"details": {"userId": 123},
"traceId": "a1b2c3"
}
}
- Provide stable error codes
- Include human-readable message
- Attach a trace/request ID for support