From 17f8f365d1c0744fe943c56dca93c509065b99c1 Mon Sep 17 00:00:00 2001 From: Richard Propst Date: Thu, 30 Sep 2021 10:15:35 -0700 Subject: [PATCH] Updating error messages and debug info --- pages/api/error.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/api/error.ts b/pages/api/error.ts index 17a7f1f30..3eda762e9 100644 --- a/pages/api/error.ts +++ b/pages/api/error.ts @@ -5,13 +5,15 @@ import * as Sentry from '@sentry/nextjs' const handler = async (req: NextApiRequest, res: NextApiResponse) => { try { console.log('try api') + console.log('*** Headers ***') + console.log(req.headers) throw new Error("API throw error test") res.status(200).json({ name: "John Doe" }); } catch (ex) { console.log('caught exception') Sentry.captureException(ex) - res.status(500).json({ error: "cannot complete request"}); + res.status(500) } };