From 525a63161e7f154a2b56c28b8e122e420287e9f6 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 4 Mar 2021 14:44:55 +0100 Subject: [PATCH] payments --- .../dashboard/src/pages/api/stripe/createCheckoutSession.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js b/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js index e8992ca5..0867f5e2 100644 --- a/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js +++ b/packages/dashboard/src/pages/api/stripe/createCheckoutSession.js @@ -52,7 +52,8 @@ export default async (req, res) => { }); res.json({ sessionId: session.id }); - } catch ({ message }) { - res.status(StatusCodes.BAD_REQUEST).json({ error: { message } }); + } catch (error) { + console.log(error); + res.status(StatusCodes.BAD_REQUEST).json({ error: { message: error.message } }); } };