gabotorresruiz commented on code in PR #34803:
URL: https://github.com/apache/superset/pull/34803#discussion_r2308219109


##########
superset/datasets/api.py:
##########
@@ -1319,9 +1322,12 @@ def render_item_list(item_list: list[dict[str, Any]]) -> 
list[dict[str, Any]]:
 
             try:
                 data[new_key] = func(data[key])
-            except TemplateSyntaxError as ex:
-                raise SupersetTemplateException(
+            except (TemplateSyntaxError, SupersetSyntaxErrorException) as ex:
+                template_exception = SupersetTemplateException(
                     f"Unable to render expression from dataset {item_type}.",
-                ) from ex
+                )
+
+                template_exception.status = 400

Review Comment:
   Hey @betodealmeida not sure if you meant `422`. Right now is a `400` error



-- 
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]

Reply via email to