Generalise exception handling
This commit is contained in:
@@ -78,7 +78,7 @@ def check_dataset_exists(function):
|
||||
@wraps(function)
|
||||
def wrapper(*args, **kwargs):
|
||||
try: datasets = Dataset.query.all()
|
||||
except (SQLAlchemyError, ConnectionError) as exception:
|
||||
except Exception as exception:
|
||||
write('system.log', f'Database error when checking existing datasets: {exception}')
|
||||
return abort(500)
|
||||
if not datasets:
|
||||
|
Reference in New Issue
Block a user