goodtables.io
goodtables.io copied to clipboard
Exception when not providing `name` in new source endpoint
ERROR:goodtablesio.blueprints.api:AttributeError("'NoneType' object has no attribute 'get'",)
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.5/site-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/srv/app/goodtablesio/utils/backend.py", line 49, in decorated_view
return view(*args, user=user, **kwargs)
File "/srv/app/goodtablesio/blueprints/api.py", line 62, in source_create
name = data.get('name')
AttributeError: 'NoneType' object has no attribute 'get'
@amercader
I would say if not providing payload at all (may be incorrect content-type?)
You are right, I didn't send any payload
I think we still need to rename this issue and fix by returning API Error and 400 if no payload. Could be low priority..