aps-agent/contracts/schemas/error.schema.json

27 lines
808 B
JSON
Raw Permalink Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://aps.local/contracts/error.schema.json",
"title": "ErrorEnvelope",
"description": "HTTP 错误统一形状;SSE 里的错误见 events.schema.json 的 error 事件。",
"$ref": "#/$defs/ErrorEnvelope",
"$defs": {
"ErrorEnvelope": {
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": ["code", "message", "retryable"],
"properties": {
"code": { "type": "string" },
"message": { "type": "string" },
"retryable": { "type": "boolean" },
"detail": {}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
}