Skip to content

Commit fc687b4

Browse files
committed
debug: try to uncover source of log error.
1 parent c208533 commit fc687b4

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

core/database/foxx/api/schema_router.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -692,18 +692,22 @@ router
692692
},
693693
});
694694
} catch (e) {
695-
logger.logRequestFailure({
696-
client: req.queryParams?.client,
697-
correlationId: req.headers["x-correlation-id"],
698-
httpVerb: "GET",
699-
routePath: basePath + "/view",
700-
status: "Failure",
701-
description: `View schema. Schema ID: ${req.queryParams.id}`,
702-
extra: {
703-
pub: sch?.pub,
704-
sys: sch?.sys,
705-
},
706-
});
695+
try {
696+
logger.logRequestFailure({
697+
client: req.queryParams?.client,
698+
correlationId: req.headers["x-correlation-id"],
699+
httpVerb: "GET",
700+
routePath: basePath + "/view",
701+
status: "Failure",
702+
description: `View schema. Schema ID: ${req.queryParams.id}`,
703+
extra: {
704+
pub: sch?.pub,
705+
sys: sch?.sys,
706+
},
707+
});
708+
} catch (logErr) {
709+
console.error("Logger failed:", logErr);
710+
}
707711
g_lib.handleException(e, res);
708712
}
709713
})

0 commit comments

Comments
 (0)