zhaoyongjie commented on issue #18993:
URL: https://github.com/apache/superset/issues/18993#issuecomment-1061390929


   Hi @cancan101,  Thanks for point this out.
   
   The endpoint `external_metadata_by_name` base on a 
[BaseSupersetView](https://github.com/apache/superset/blob/e89f0abf95a5b49291bfa11f1d0277ade43eb2c0/superset/views/datasource/views.py#L57).
 `BaseSupersetView` hasn't `response_400` method, so that when we invoke 
`self.response_400(message="Not a valid rison argument")` in `rison` 
[decorator](https://github.com/dpgaspar/Flask-AppBuilder/blob/2d505e819d496308a34c5f623d70331a37599cc4/flask_appbuilder/api/__init__.py#L128-L159),
 it raise a 500 exception.
   
   I think we have 2 ways to fix this.
   1. Use `BaseSupersetModelRestApi` instead of `BaseSupersetView` in 
datasource.views
   2. The `rison` decorator raise a `ValueError` exception instead a HTTP 
response.
   
   @dpgaspar What do you think about this issue?
   


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