You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.info('REST response for '+method+': '+JSON.stringify(commandRes.data));
48
+
returnPromise.resolve(commandRes.data);
49
+
})
50
+
.catch((err)=>{
51
+
logger.error('REST lightning error from '+method+' command');
52
+
if(typeoferr==='string'){
53
+
logger.error(err);
54
+
thrownewLightningError(err,err,HttpStatusCode.LIGHTNING_SERVER,'Core Lightning API Error');
55
+
}
56
+
else{
57
+
logger.error(JSON.stringify(err));
58
+
thrownewLightningError(err.response?.data?.message||err.message||err.error,err.response?.data||err.error||err.message,HttpStatusCode.LIGHTNING_SERVER,'Core Lightning API Error');
59
+
}
60
+
});
61
+
caseAppConnect.GRPC:
62
+
break;
63
+
default:
64
+
returnthis.clnService
65
+
.commando({
66
+
method: method,
67
+
params: methodParams,
68
+
rune: APP_CONSTANTS.COMMANDO_RUNE,
69
+
reqId: crypto.randomBytes(8).toString('hex'),
70
+
reqIdPrefix: 'clnapp',
71
+
})
72
+
.then((commandRes)=>{
73
+
logger.info('Commando response for '+method+': '+JSON.stringify(commandRes));
74
+
returnPromise.resolve(commandRes);
75
+
})
76
+
.catch((err)=>{
77
+
logger.error('Commando lightning error from '+method+' command');
78
+
if(typeoferr==='string'){
79
+
logger.error(err);
80
+
thrownewLightningError(err,err,HttpStatusCode.LIGHTNING_SERVER,'Core Lightning API Error');
81
+
}
82
+
else{
83
+
logger.error(JSON.stringify(err));
84
+
thrownewLightningError(err.message||err.error,err.error||err.message,HttpStatusCode.LIGHTNING_SERVER,'Core Lightning API Error');
0 commit comments