summary refs log tree commit diff
path: root/synapse/rest/transactions.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-26 14:49:44 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-26 14:49:44 +0100
commit5c0be8fde3602b9b7396cfdb2d689447f59217f7 (patch)
tree977e5832c0f09e71583c9d0219a21b6e11c194d7 /synapse/rest/transactions.py
parentAdded basic in-memory REST transaction storage. Only the latest transaction f... (diff)
downloadsynapse-5c0be8fde3602b9b7396cfdb2d689447f59217f7.tar.xz
Implemented /rooms/$roomid/[invite|join|leave] with POST / PUT (incl txn ids)
Diffstat (limited to 'synapse/rest/transactions.py')
-rw-r--r--synapse/rest/transactions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/rest/transactions.py b/synapse/rest/transactions.py
index 10be10e903..b8aa1ef11c 100644
--- a/synapse/rest/transactions.py
+++ b/synapse/rest/transactions.py
@@ -41,6 +41,7 @@ class HttpTransactionStore(object):
             logger.debug("get_response Key: %s TxnId: %s", key, txn_id)
             (last_txn_id, response) = self.transactions[key]
             if txn_id == last_txn_id:
+                logger.info("get_response: Returning a response for %s", key)
                 return response
         except KeyError:
             pass
@@ -78,11 +79,13 @@ class HttpTransactionStore(object):
             request must have the transaction ID as the last path segment.
             txn_id (str): The transaction ID for this request.
         Returns:
-            The response tuple or (None, None).
+            The response tuple.
+        Raises:
+            KeyError if the transaction was not found.
         """
         response = self.get_response(self._get_key(request), txn_id)
         if response is None:
-            return (None, None)
+            raise KeyError("Transaction not found.")
         return response
 
     def _get_key(self, request):