From a03a13a062f6789c511a520f8da38f12899b9b22 Mon Sep 17 00:00:00 2001 From: AP Date: Thu, 5 Dec 2019 05:28:42 +0100 Subject: [PATCH] chore: details in error --- src/helpers/helpers.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/helpers.ts b/src/helpers/helpers.ts index 3ae3e123..8789ffa1 100644 --- a/src/helpers/helpers.ts +++ b/src/helpers/helpers.ts @@ -58,9 +58,10 @@ export const getAuthLnd = (auth: string) => { return lnd; }; -export const getErrorMsg = (error: any): string => { +export const getErrorMsg = (error: any[]): string => { const code = error[0]; const msg = error[1]; + const details = error.length > 2 ? error[2].details : ''; - return JSON.stringify({ code, msg }); + return JSON.stringify({ code, msg, details }); };