From c9a7deeb2ba8e8e53345f059bc847a94be641063 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Mon, 27 Nov 2023 20:50:35 +0000 Subject: [PATCH 1/2] :bug: improved gocardless error handling --- src/app-gocardless/app-gocardless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app-gocardless/app-gocardless.js b/src/app-gocardless/app-gocardless.js index 9c1d1f05f..5d2fe00e2 100644 --- a/src/app-gocardless/app-gocardless.js +++ b/src/app-gocardless/app-gocardless.js @@ -205,7 +205,7 @@ app.post( case isAxiosError(error): console.log( 'Something went wrong', - inspect(error.response.data, { depth: null }), + inspect(error.response?.data || error, { depth: null }), ); sendErrorResponse({ error_type: 'SYNC_ERROR', From 958e9a46ea58905a75374675207ed4111a037987 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Mon, 27 Nov 2023 20:51:24 +0000 Subject: [PATCH 2/2] Release notes --- upcoming-release-notes/282.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 upcoming-release-notes/282.md diff --git a/upcoming-release-notes/282.md b/upcoming-release-notes/282.md new file mode 100644 index 000000000..ad88f3169 --- /dev/null +++ b/upcoming-release-notes/282.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [MatissJanis] +--- + +Improved error handling of GoCardless issues