From 5da7fbb42ceceec2e1208227e2167ff97b8a2141 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 12 Oct 2021 12:49:49 -0400 Subject: [PATCH 1/2] Fix formatting string when oEmbed errors occur. --- synapse/rest/media/v1/oembed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/rest/media/v1/oembed.py b/synapse/rest/media/v1/oembed.py index 6d7e1f9064af..78b1603f19f5 100644 --- a/synapse/rest/media/v1/oembed.py +++ b/synapse/rest/media/v1/oembed.py @@ -191,7 +191,7 @@ def parse_oembed_response(self, url: str, raw_body: bytes) -> OEmbedResult: except Exception as e: # Trap any exception and let the code follow as usual. - logger.warning(f"Error parsing oEmbed metadata from {url}: {e:r}") + logger.warning("Error parsing oEmbed metadata from %s: %r", url, e) open_graph_response = {} cache_age = None From e6497c1c652bfdcb05b4329af36166001912e312 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 12 Oct 2021 12:52:44 -0400 Subject: [PATCH 2/2] Newsfragment --- changelog.d/11061.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/11061.bugfix diff --git a/changelog.d/11061.bugfix b/changelog.d/11061.bugfix new file mode 100644 index 000000000000..26fb64379375 --- /dev/null +++ b/changelog.d/11061.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in Synapse v1.44.0 when logging errors during oEmbed processing.