Generalise exception handling

This commit is contained in:
viveksantayana committed 2022-08-20 14:47:46 +01:00
1 parent d9837246de
commit bcee2eedd0
15 files changed
+65 -65

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ def _view_console(id:str=None):
dataset = Dataset.query.filter_by(id=id).first()
datasets = Dataset.query.count()
users = User.query.all()
except (SQLAlchemyError, ConnectionError) as exception:
except Exception as exception:
write('system.log', f'Database error when processing request \'{request.url}\': {exception}')
return abort(500)
if not dataset: