diff --git a/server/src/middleware/prudence-validate.ts b/server/src/middleware/prudence-validate.ts index 2b76d7610..c0c941f2c 100644 --- a/server/src/middleware/prudence-validate.ts +++ b/server/src/middleware/prudence-validate.ts @@ -15,6 +15,8 @@ const API_ERR_HANDLER: MiddlewareErrorHandler = (req, res, next, error) => { if (typeof stringVal === "object" && stringVal !== null && !stringVal.toString) { // this is probably null-prototype stringVal = null; + } else if (stringVal === undefined) { + stringVal = "nothing"; } else { stringVal = String(stringVal); }