Skip to content

Commit

Permalink
feat: better login for failed db connections
Browse files Browse the repository at this point in the history
  • Loading branch information
crazybolillo committed Sep 13, 2024
1 parent d5832ec commit c2402a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func serve(ctx context.Context) error {

conn, err := pgx.Connect(ctx, os.Getenv("DATABASE_URL"))
if err != nil {
slog.Error("failed to establish database connection")
slog.Error("failed to establish database connection", slog.String("reason", err.Error()))
return err
}
defer conn.Close(ctx)
Expand Down

0 comments on commit c2402a4

Please sign in to comment.