[monorepo] prepare for zod everywhere epic (#36027)

GitOrigin-RevId: f082ae7fc7857fa72b2c1823645050bd4f6df305
This commit is contained in:
Jakob Ackermann
2026-09-17 11:42:46 +00:00
committed by Copybot
parent bff27fc3cc
commit 81df324bcc
27 changed files with 2588 additions and 70 deletions
+9 -5
View File
@@ -1,4 +1,5 @@
const OError = require('@overleaf/o-error')
const { getRawReqInput } = require('@overleaf/validation-tools')
function errSerializer(err) {
if (!err) {
@@ -36,11 +37,14 @@ function reqSerializer(req) {
'content-length': headers['content-length'],
},
}
if (req.params) {
const projectId =
req.params.projectId || req.params.project_id || req.params.Project_id
const userId = req.params.userId || req.params.user_id
const docId = req.params.docId || req.params.doc_id
// raw access justified: case 2 (final error-handler logging) — this
// serializer must not throw while extracting log context, and bunyan
// silently drops the whole `req` field (with a stderr warning) if it did
const { params } = getRawReqInput(req)
if (params) {
const projectId = params.projectId || params.project_id || params.Project_id
const userId = params.userId || params.user_id
const docId = params.docId || params.doc_id
if (projectId) {
entry.projectId = projectId
}