summary refs log tree commit diff
path: root/synapse/appservice
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-05 13:19:46 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-05 13:19:46 +0000
commit51d63ac329a2613c0a7195e6183d70f789b7d823 (patch)
treeb8a0c41fefa5b141865025cfbc4ef0a83d6e346d /synapse/appservice
parentAdd unit test for appservice_handler.query_room_alias_exists (diff)
downloadsynapse-51d63ac329a2613c0a7195e6183d70f789b7d823.tar.xz
Glue AS work to general event notifications. Add more exception handling when poking ASes.
Diffstat (limited to 'synapse/appservice')
-rw-r--r--synapse/appservice/__init__.py2
-rw-r--r--synapse/appservice/api.py11
2 files changed, 11 insertions, 2 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py
index f7baf578f0..d9ca856c8b 100644
--- a/synapse/appservice/__init__.py
+++ b/synapse/appservice/__init__.py
@@ -62,7 +62,7 @@ class ApplicationService(object):
 
     def _matches_regex(self, test_string, namespace_key):
         if not isinstance(test_string, basestring):
-            logger.warning(
+            logger.error(
                 "Expected a string to test regex against, but got %s",
                 test_string
             )
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py
index 29bb35d61b..d96caf7f58 100644
--- a/synapse/appservice/api.py
+++ b/synapse/appservice/api.py
@@ -46,6 +46,9 @@ class ApplicationServiceApi(SimpleHttpClient):
                 defer.returnValue(False)
                 return
             logger.warning("query_user to %s received %s", uri, e.code)
+        except Exception as ex:
+            logger.warning("query_user to %s threw exception %s", uri, ex)
+        defer.returnValue(False)
 
     @defer.inlineCallbacks
     def query_alias(self, service, alias):
@@ -62,6 +65,10 @@ class ApplicationServiceApi(SimpleHttpClient):
                 defer.returnValue(False)
                 return
             logger.warning("query_alias to %s received %s", uri, e.code)
+        except Exception as ex:
+            logger.warning("query_alias to %s threw exception %s", uri, ex)
+        defer.returnValue(False)
+
 
     @defer.inlineCallbacks
     def push_bulk(self, service, events):
@@ -82,7 +89,9 @@ class ApplicationServiceApi(SimpleHttpClient):
                 defer.returnValue(True)
         except CodeMessageException as e:
             logger.warning("push_bulk to %s received %s", uri, e.code)
-            defer.returnValue(False)
+        except Exception as ex:
+            logger.warning("push_bulk to %s threw exception %s", uri, ex)
+        defer.returnValue(False)
 
     @defer.inlineCallbacks
     def push(self, service, event):