Summary
When the catalog API returns a 400 error with validation violations, the CLI displays generic error messages instead of the actual validation details.
Current Behavior
HTTP Error 400: Unknown error - No details (Request ID: No request ID)
Expected Behavior
The CLI should display the validation violations returned by the API:
{
"ok": false,
"violations": [
{
"title": "Cortex Entity Relationships",
"description": "Relationships of type 'geography' from 'united-states' cannot have sources of type 'service'.",
"violationType": "MUST",
"ruleLink": "https://docs.cortex.io/",
"paths": ["/info//x-cortex-relationships"],
"pointer": "/info//x-cortex-relationships",
"startLine": 1,
"endLine": 58
}
]
}
Root Cause
The error handling in cortexapps_cli/cortex_client.py (lines 147-160) expects a specific JSON structure with message, details, and requestId fields, but validation errors use a violations array structure instead.
Proposed Solution
Update the error handling in CortexClient.request() to detect and format violations array responses in addition to the existing error format.
Summary
When the catalog API returns a 400 error with validation violations, the CLI displays generic error messages instead of the actual validation details.
Current Behavior
Expected Behavior
The CLI should display the validation violations returned by the API:
{ "ok": false, "violations": [ { "title": "Cortex Entity Relationships", "description": "Relationships of type 'geography' from 'united-states' cannot have sources of type 'service'.", "violationType": "MUST", "ruleLink": "https://docs.cortex.io/", "paths": ["/info//x-cortex-relationships"], "pointer": "/info//x-cortex-relationships", "startLine": 1, "endLine": 58 } ] }Root Cause
The error handling in
cortexapps_cli/cortex_client.py(lines 147-160) expects a specific JSON structure withmessage,details, andrequestIdfields, but validation errors use aviolationsarray structure instead.Proposed Solution
Update the error handling in
CortexClient.request()to detect and formatviolationsarray responses in addition to the existing error format.