about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--LibMatrix/Extensions/MatrixHttpClient.Single.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/LibMatrix/Extensions/MatrixHttpClient.Single.cs b/LibMatrix/Extensions/MatrixHttpClient.Single.cs
index e722370..c9cd260 100644
--- a/LibMatrix/Extensions/MatrixHttpClient.Single.cs
+++ b/LibMatrix/Extensions/MatrixHttpClient.Single.cs
@@ -146,6 +146,10 @@ public class MatrixHttpClient {
         try {
             return await GetFromJsonAsync<T>(requestUri, options, cancellationToken);
         }
+        catch (JsonException e) {
+            Console.WriteLine($"Failed to deserialize response from {requestUri}: {e.Message}");
+            return default;
+        }
         catch (HttpRequestException e) {
             Console.WriteLine($"Failed to get {requestUri}: {e.Message}");
             return default;