Skip to content

Commit

Permalink
fix: proper json logging (#2281)
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanierh authored Oct 26, 2023
1 parent 775f5f3 commit 6447d0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connectors/src/api_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import { authMiddleware } from "@connectors/middleware/auth";

export function startServer(port: number) {
process.on("unhandledRejection", (reason, promise) => {
logger.error("Unhandled Rejection at:", promise, "reason:", reason);
logger.error({ promise, reason }, "Unhandled Rejection");
});

process.on("uncaughtException", (error) => {
logger.error("Uncaught Exception thrown", error);
logger.error({ error }, "Uncaught Exception");
});

const app = express();
Expand Down

0 comments on commit 6447d0e

Please sign in to comment.