cancan101 opened a new issue #18993:
URL: https://github.com/apache/superset/issues/18993


   When this error handler is hit:
   
https://github.com/dpgaspar/Flask-AppBuilder/blob/2d505e819d496308a34c5f623d70331a37599cc4/flask_appbuilder/api/__init__.py#L145-L146
 in the `superset.views.datasource.views.Datasource` view, a a further 
Exception is raised as there is no 400 handler for that view:
   ```
   Traceback (most recent call last):
     File 
"/Users/alex/.pyenv/versions/3.7.3/envs/app/lib/python3.7/site-packages/superset/views/base.py",
 line 203, in wraps
       return f(self, *args, **kwargs)
     File 
"/Users/alex/.pyenv/versions/3.7.3/envs/app/lib/python3.7/site-packages/flask_appbuilder/api/__init__.py",
 line 145, in wraps
       return self.response_400(
   AttributeError: 'Datasource' object has no attribute 'response_400'
   ```
   
   #### How to reproduce the bug
   
   1. Use legacy datasource editor
   2. Define a table with an `=` in its name
   3. Click sync columns from source
   
   ### Expected results
   
   Ideally it should handle the table name (it looks like the string is not 
properly `rison` encoded. If it isn't going to allow these strings, then at the 
very least the 400 error should be properly generated
   
   what you expected to happen.
   
   ### Actual results
   
   A toast showing: "'Datasource' object has no attribute 'response_400'"
   
   what actually happens.
   
   #### Screenshots
   The dataset:
   
![image](https://user-images.githubusercontent.com/51059/156256040-4b71d68e-20af-4cf4-9b5f-709084f0b405.png)
   
   The error toast:
   
![image](https://user-images.githubusercontent.com/51059/156256007-1ebc7578-332f-4d9b-9405-1411cce4f22a.png)
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Chrome 98.0.4758.102 
   - superset version: `Superset 1.4.1`
   - python version: `Python 3.7.3`
   - node.js version: `v15.4.0`
   - any feature flags active: n/a
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


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