diff --git a/synapse/http/federation/matrix_federation_agent.py b/synapse/http/federation/matrix_federation_agent.py
index e4226b5c319396ecf9d05dd094d6f7871ac06c8b..fd298d83f4df48aec21036d74b99b87a8a5fa5a1 100644
--- a/synapse/http/federation/matrix_federation_agent.py
+++ b/synapse/http/federation/matrix_federation_agent.py
@@ -298,7 +298,7 @@ class MatrixFederationAgent(object):
             )
             body = yield make_deferred_yieldable(readBody(response))
             if response.code != 200:
-                raise Exception("Non-200 response %s", response.code)
+                raise Exception("Non-200 response %s" % (response.code, ))
         except Exception as e:
             logger.info("Error fetching %s: %s", uri_str, e)