diff --git a/Tests/TestBase.cs b/Tests/TestBase.cs index 9260a42..981af66 100644 --- a/Tests/TestBase.cs +++ b/Tests/TestBase.cs @@ -35,6 +35,7 @@ await webSocketTestClient.DoAndAssert(new ClientWantsToSignUpDto { RegisterUserD var jwtSubscription = webSocketTestClient.Client.MessageReceived.Subscribe(msg => { + Console.WriteLine(msg.Text); var serverAuthenticates = JsonSerializer.Deserialize(msg.Text, options: new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); jwt = serverAuthenticates.Jwt; }); diff --git a/api/GlobalExceptionHandler.cs b/api/GlobalExceptionHandler.cs index daf0e3f..cd88b61 100644 --- a/api/GlobalExceptionHandler.cs +++ b/api/GlobalExceptionHandler.cs @@ -27,7 +27,8 @@ public static void Handle(this Exception ex, IWebSocketConnection socket, string else serverResponse = new ServerSendsErrorMessage { - Error = "Something went wrong. Please try again later." + // TODO: revert Error = "Something went wrong. Please try again later." + Error = message ?? ex.Message }; socket.SendDto(serverResponse); diff --git a/api/Program.cs b/api/Program.cs index 64793b3..77dfb40 100644 --- a/api/Program.cs +++ b/api/Program.cs @@ -53,7 +53,8 @@ public static async Task StartApi(string[] args) await dbContainer.StartAsync(); - var connectionString = dbContainer.GetConnectionString(); + var connectionString = dbContainer.GetConnectionString() + ";Include Error Detail=true;"; + Console.WriteLine(connectionString); builder.Services.AddDbContextFactory(options => { options.UseNpgsql(connectionString ?? throw new Exception("Connection string cannot be null"));