mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #29471 from overleaf/revert-29369-mfb-from-joi-to-zod-clsi-cache
Revert "migrate from joi to zod CLSI-CACHE service" GitOrigin-RevId: 1846e5a1d990f7ff22982fc32277e24d69e9d1e0
This commit is contained in:
committed by
Copybot
parent
1720314726
commit
a88c307962
@@ -1,17 +0,0 @@
|
||||
const { isZodErrorLike, fromError } = require('zod-validation-error')
|
||||
/**
|
||||
* @typedef {import('express').ErrorRequestHandler} ErrorRequestHandler
|
||||
*/
|
||||
|
||||
const handleValidationError = [
|
||||
/** @type {ErrorRequestHandler} */
|
||||
(err, req, res, next) => {
|
||||
if (!isZodErrorLike(err)) {
|
||||
return next(err)
|
||||
}
|
||||
|
||||
res.status(400).json({ ...fromError(err), statusCode: 400 })
|
||||
},
|
||||
]
|
||||
|
||||
module.exports = { handleValidationError }
|
||||
Reference in New Issue
Block a user