From 087912151b27634f3e70c26c7b65b5dc5d050c37 Mon Sep 17 00:00:00 2001
From: yhoupert <yhoupert@linagora.com>
Date: Tue, 27 Feb 2018 15:09:44 +0100
Subject: [PATCH] patch parsing error

---
 lib/webserver/routes.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/webserver/routes.js b/lib/webserver/routes.js
index f64fa1b..1c9e4a0 100644
--- a/lib/webserver/routes.js
+++ b/lib/webserver/routes.js
@@ -58,10 +58,11 @@ const routesFactory = config => {
           }
 
           const jsonStr = json.transcript.transcription;
-          const transcription = JSON.parse(json.transcript.transcription);
           let jsonResponse = {};
 
           try {
+            const transcription = JSON.parse(json.transcript.transcription);
+
             jsonResponse = {
               status: 0,
               hypotheses: transcription.hypotheses,
-- 
GitLab