mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-11 07:00:47 +02:00
Merge pull request #33413 from overleaf/revert-33040-em-parse-req-errors
Revert "Replace isZodErrorLike with custom error types in request validation" GitOrigin-RevId: 1f51fe9e14ffabf283f1229552d3887136420f8f
This commit is contained in:
@@ -54,7 +54,7 @@ describe('parseReq', () => {
|
||||
}),
|
||||
})
|
||||
)
|
||||
).toThrowError(expect.objectContaining({ name: 'InvalidParamsError' }))
|
||||
).toThrowError(expect.objectContaining({ name: 'ParamsError' }))
|
||||
})
|
||||
|
||||
it('should throw an error containing issues if the schema is invalid', () => {
|
||||
@@ -75,11 +75,9 @@ describe('parseReq', () => {
|
||||
)
|
||||
).toThrowError(
|
||||
expect.objectContaining({
|
||||
zodError: expect.objectContaining({
|
||||
issues: expect.arrayContaining([
|
||||
expect.objectContaining({ path: ['body', 'name'] }),
|
||||
]),
|
||||
}),
|
||||
issues: expect.arrayContaining([
|
||||
expect.objectContaining({ path: ['body', 'name'] }),
|
||||
]),
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user