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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user