From 3682f7857877efe1ddf300564f6f814652eadd0c Mon Sep 17 00:00:00 2001 From: chasers Date: Wed, 30 Jun 2021 16:10:27 -0700 Subject: [PATCH] Add unhandled error --- pages/api/error-uncaught.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 pages/api/error-uncaught.js diff --git a/pages/api/error-uncaught.js b/pages/api/error-uncaught.js new file mode 100644 index 0000000..a9d3b3a --- /dev/null +++ b/pages/api/error-uncaught.js @@ -0,0 +1,8 @@ +export default function handler(req, res) { + + // This will blow up + + statusCode = response.statusCode + + res.status(500).json({ error: 'true' }) +} \ No newline at end of file