ytsaurus-ui
ytsaurus-ui copied to clipboard
Show correct labels for YQL errors
Sometimes it is hard to understand YQL errors. Sometimes they are misleading. For example:
Here we have an error DQ cannot execute the query
, which is more like a warning and is misleading. Also it wasn't hidden (1st screenshot) as it is a separate branch.
But in the get_query
response we see that the error has some attributes about severity
"inner_errors": [
{
"code": 31070,
"message": "Optimization",
"attributes": {
"yql_status": "Core optimization",
"severity": "Info" ===========================================
},
"inner_errors": [
{
"code": 30000,
"message": "DQ cannot execute the query. Cause: system python udf",
"attributes": {
"yql_status": "Default error",
"severity": "Info" ============================================
}
}
]
},
{
"code": 31060,
"message": "Execution",
"attributes": {
"yql_status": "Core exec",
"severity": "Error" =========================================
},
"inner_errors": [
{
"code": 30000,
"message": "Execution of node: Result",
"attributes": {
"yql_status": "Default error",
"end_position": {
"column": 1,
"row": 7
},
"severity": "Error", ====================================================
"start_position": {
"column": 1,
"row": 7
}
},
But on the screenshots above, all lines are marked as Error
, while Core optimization
and DQ cannot execute the query. Cause: system python udf
should be marked as Info
.
So I suggest:
- Parse severity and show correct severity for lines
- Improve error folding by folding everything that is not
Error
severity