diff --git a/src/adapters/express.ts b/src/adapters/express.ts index f5ab0100..c5482d0e 100644 --- a/src/adapters/express.ts +++ b/src/adapters/express.ts @@ -31,6 +31,8 @@ export function handleExpressError(e: unknown | OAuthException, res: Response): res.send({ status: e.status, message: e.message, + error: e.errorType, + error_description: e.errorDescription ?? e.error, }); return; } diff --git a/src/adapters/fastify.ts b/src/adapters/fastify.ts index cfaecd97..3d16df95 100644 --- a/src/adapters/fastify.ts +++ b/src/adapters/fastify.ts @@ -25,6 +25,8 @@ export function handleFastifyError(e: unknown | OAuthException, res: FastifyRepl res.status(e.status).send({ status: e.status, message: e.message, + error: e.errorType, + error_description: e.errorDescription ?? e.error, }); return; }