bito-code-review[bot] commented on PR #43423:
URL: https://github.com/apache/superset/pull/43423#issuecomment-5381527264
<!-- Bito Reply -->
The flagged issue is correct. The current implementation in the PR catches
`TemplateError` but misses `SupersetParseError`, which is specifically raised
by `process_jinja_sql()` when partition macros cannot be resolved. To resolve
this, you should update the exception handling in
`superset/commands/tag/create.py` to include `SupersetParseError` in the
`except` block.
Here is the corrected implementation:
```python
from superset.exceptions import SupersetParseError
# ...
except (SupersetSecurityException, TemplateError,
SupersetParseError):
exceptions.append(
TagCreateFailedError(
f"Could not validate access for {object_type}
{object_id}"
)
)
```
I have checked the available PR comments, and there are no other pending
review comments to address. Would you like me to proceed with any other changes?
**superset/commands/tag/create.py**
```
except (SupersetSecurityException, TemplateError, SupersetParseError):
exceptions.append(
TagCreateFailedError(
f"Could not validate access for {object_type}
{object_id}"
)
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]