Merge pull request #33490 from overleaf/em-parse-req-errors-2

Reintroduce custom error types in request validation

GitOrigin-RevId: 1985ca04c8fe693fb836b042517d94700343bc46
This commit is contained in:
Eric Mc Sween
2026-05-08 08:10:13 +00:00
committed by Copybot
parent 8c0589df7f
commit 2bb35fafb8
17 changed files with 105 additions and 85 deletions
@@ -845,8 +845,8 @@ describe('CompileController', function () {
it('should reject the request', function (ctx) {
ctx.next.should.have.been.calledWithMatch({
name: 'ParamsError',
cause: asZodError({
name: 'InvalidParamsError',
zodError: asZodError({
code: 'custom',
path: ['params', 'file'],
message: 'path traversal detected',
@@ -868,8 +868,8 @@ describe('CompileController', function () {
it('should reject the request', function (ctx) {
ctx.next.should.have.been.calledWithMatch({
name: 'ParamsError',
cause: asZodError({
name: 'InvalidParamsError',
zodError: asZodError({
origin: 'string',
code: 'invalid_format',
format: 'regex',