diff --git a/src/api/throw.ts b/src/api/throw.ts new file mode 100644 index 00000000..ee487556 --- /dev/null +++ b/src/api/throw.ts @@ -0,0 +1,14 @@ +import type { GatsbyFunctionRequest, GatsbyFunctionResponse } from 'gatsby' + +const foo = async () => { + throw Error('This was intended') +} + +const handler = async ( + _req: GatsbyFunctionRequest, + _res: GatsbyFunctionResponse +) => { + await foo() +} + +export default handler