Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
juuwel committed Apr 25, 2024
1 parent ac4ece7 commit 88efb71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Tests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ServerAuthenticatesUser>(msg.Text, options: new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
jwt = serverAuthenticates.Jwt;
});
Expand Down
3 changes: 2 additions & 1 deletion api/GlobalExceptionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public static async Task<WebApplication> StartApi(string[] args)

await dbContainer.StartAsync();

var connectionString = dbContainer.GetConnectionString();
var connectionString = dbContainer.GetConnectionString() + ";Include Error Detail=true;";
Console.WriteLine(connectionString);
builder.Services.AddDbContextFactory<ApplicationDbContext>(options =>
{
options.UseNpgsql(connectionString ?? throw new Exception("Connection string cannot be null"));
Expand Down

0 comments on commit 88efb71

Please sign in to comment.