From 904747ec66bb8a111278b1e1678ddb5fb97cb2bd Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Thu, 18 Nov 2021 08:39:56 +0100
Subject: [PATCH] Add dependencies and missing exception handling
---
app/corpora/cqi_over_socketio/utils.py | 5 ++++-
requirements.txt | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/corpora/cqi_over_socketio/utils.py b/app/corpora/cqi_over_socketio/utils.py
index 04b9f1d0..7cbe07b9 100644
--- a/app/corpora/cqi_over_socketio/utils.py
+++ b/app/corpora/cqi_over_socketio/utils.py
@@ -35,7 +35,10 @@ def cqi_over_socketio(f):
try:
return_value = f(**f_args)
except BrokenPipeError:
- pass
+ return_value = {
+ 'code': 500,
+ 'msg': 'Internal Server Error'
+ }
except cqi.errors.CQiException as e:
return_value = {
'code': 500,
diff --git a/requirements.txt b/requirements.txt
index 8d9b0668..f1afb44a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,6 +13,7 @@ Flask-SocketIO~=5.1
Flask-SQLAlchemy
Flask-WTF
gunicorn
+hiredis
jsonpatch
jsonschema
psycopg2