From c9a7deeb2ba8e8e53345f059bc847a94be641063 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Mon, 27 Nov 2023 20:50:35 +0000 Subject: [PATCH] :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',