about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs b/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs

index 060867d..695e8e3 100644 --- a/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs +++ b/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs
@@ -40,6 +40,7 @@ public class MatrixHttpClient : HttpClient { var content = await a.Content.ReadAsStringAsync(cancellationToken); if (content.StartsWith('{')) { var ex = JsonSerializer.Deserialize<MatrixException>(content); + ex.RawContent = content; Console.WriteLine($"Failed to send request: {ex}"); if (ex?.RetryAfterMs is not null) { await Task.Delay(ex.RetryAfterMs.Value, cancellationToken); @@ -61,4 +62,4 @@ public class MatrixHttpClient : HttpClient { await using var responseStream = await response.Content.ReadAsStreamAsync(cancellationToken); return await JsonSerializer.DeserializeAsync<T>(responseStream, cancellationToken: cancellationToken); } -} \ No newline at end of file +}