mikebridge commented on code in PR #44028:
URL: https://github.com/apache/superset/pull/44028#discussion_r4064711407
##########
superset/dashboards/api.py:
##########
@@ -2750,6 +2752,8 @@ def copy_dash(self, original_dash: Dashboard) -> Response:
dash = CopyDashboardCommand(original_dash, data).run()
except DashboardForbiddenError:
return self.response_403()
+ except DashboardInvalidError as ex:
+ return self.response_422(message=ex.normalized_messages())
Review Comment:
I checked the copy endpoint with empty and null titles, both with and
without chart duplication. All four cases return HTTP 422 with
`{"message":"Could not process entity"}`. Flask-AppBuilder's `response_422`
supplies that fallback when `normalized_messages()` is empty, so the response
body isn't empty. Layout-specific validation errors still return their
structured messages.
--
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]