diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index b5810b9ba3..4785994da4 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -278,6 +278,9 @@ class TestConfiguration { if (params) { request.params = params } + request.throw = (status: number, message: string) => { + throw new Error(`Error ${status} - ${message}`) + } return this.doInContext(appId, async () => { await controlFunc(request) return request.body