From 7481245640624366fb8769869fbd1a06ea1cba0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 26 Jun 2024 20:26:48 +0100 Subject: [PATCH] chore: Log full error when building digital planning application [skip pizza] --- api.planx.uk/modules/admin/session/digitalPlanningData.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api.planx.uk/modules/admin/session/digitalPlanningData.ts b/api.planx.uk/modules/admin/session/digitalPlanningData.ts index f974839b28..211644e62b 100644 --- a/api.planx.uk/modules/admin/session/digitalPlanningData.ts +++ b/api.planx.uk/modules/admin/session/digitalPlanningData.ts @@ -40,9 +40,8 @@ export const getDigitalPlanningApplicationPayload = async ( return res.send(data); } catch (error) { return next({ - message: - "Failed to make Digital Planning Application payload: " + - (error as Error).message, + message: `Failed to make Digital Planning Application payload: + ${JSON.stringify(error as Error, null, 2)}.`, }); } };