From 1d4cd5fb8658dc1db0d639dfd04f8d677e136a13 Mon Sep 17 00:00:00 2001
From: James Calfee <james@jcalfee.info>
Date: Thu, 20 Oct 2016 13:40:11 -0500
Subject: [PATCH] Catch and report image upload network errors #185

---
 app/redux/UserSaga.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/redux/UserSaga.js b/app/redux/UserSaga.js
index e2f123de5..ede6ae8bf 100644
--- a/app/redux/UserSaga.js
+++ b/app/redux/UserSaga.js
@@ -427,6 +427,11 @@ function* uploadImage({payload: {file, dataUrl, filename = 'image.txt', progress
         const {url} = res
         progress({url})
     })
+    .catch(error => {
+        console.error(filename, error)
+        progress({error: 'Unable to contact the server.'})
+        return
+    })
 }
 
 
-- 
GitLab