From ebfac260a19208d4b199f5fbbc38b7fbf68d1c30 Mon Sep 17 00:00:00 2001 From: Julia Ilasova <1julka1il@gmail.com> Date: Tue, 28 May 2024 14:08:11 +0200 Subject: [PATCH] print error --- Tests/WebSocketTestClient.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Tests/WebSocketTestClient.cs b/Tests/WebSocketTestClient.cs index d75ba23..02340c8 100644 --- a/Tests/WebSocketTestClient.cs +++ b/Tests/WebSocketTestClient.cs @@ -16,13 +16,15 @@ public WebSocketTestClient(string? url = null) Client.MessageReceived.Subscribe(msg => { BaseDto baseDto = JsonSerializer.Deserialize(msg.Text); + Console.WriteLine("Received message: " + baseDto.eventType); - if (baseDto.eventType == "ServerSendsErrorMessage" || baseDto.eventType.Contains("ServerResponds") || baseDto.eventType.Contains("ServerRejects")) + if (baseDto.eventType == "ServerSendsErrorMessage" || baseDto.eventType.Contains("ServerResponds") || + baseDto.eventType.Contains("ServerRejects")) { var error = JsonSerializer.Deserialize(msg.Text); - throw new Exception(error!.Error); + Console.WriteLine("Error: " + error!.Error); } - + lock (ReceivedMessages) ReceivedMessages.Add(baseDto); });