diff --git a/backend/utils/common.js b/backend/utils/common.js index a8442c444..de9881508 100644 --- a/backend/utils/common.js +++ b/backend/utils/common.js @@ -303,15 +303,7 @@ export class CommonService { } }; this.handleError = (errRes, fileName, errMsg, selectedNode) => { - let err = JSON.parse(JSON.stringify(errRes)); - if (err && err.error && Object.keys(err.error).length === 0 && errRes.error && (errRes.error.stack || errRes.error.message)) { - errRes.error = errRes.error.stack || errRes.error.message; - err = JSON.parse(JSON.stringify(errRes)); - } - else if (errRes.message || errRes.stack) { - errRes.error = errRes.message || errRes.stack; - err = JSON.parse(JSON.stringify(errRes)); - } + const err = JSON.parse(JSON.stringify(errRes)); if (!selectedNode) { selectedNode = this.selectedNode; } @@ -325,11 +317,11 @@ export class CommonService { } break; case 'CLN': - if (err.options && err.options.headers && err.options.headers.macaroon) { - delete err.options.headers.macaroon; + if (err.options && err.options.headers && err.options.headers.rune) { + delete err.options.headers.rune; } - if (err.response && err.response.request && err.response.request.headers && err.response.request.headers.macaroon) { - delete err.response.request.headers.macaroon; + if (err.response && err.response.request && err.response.request.headers && err.response.request.headers.rune) { + delete err.response.request.headers.rune; } break; case 'ECL': diff --git a/backend/utils/config.js b/backend/utils/config.js index 1cf1c1369..79d3206e5 100644 --- a/backend/utils/config.js +++ b/backend/utils/config.js @@ -375,9 +375,9 @@ export class ConfigService { fs.writeFileSync(confFileFullPath, JSON.stringify(config, null, 2), 'utf-8'); }; this.setServerConfiguration = () => { + const rtlConfFilePath = (process?.env?.RTL_CONFIG_PATH) ? process?.env?.RTL_CONFIG_PATH : join(this.directoryName, '../..'); + const confFileFullPath = rtlConfFilePath + sep + 'RTL-Config.json'; try { - const rtlConfFilePath = (process?.env?.RTL_CONFIG_PATH) ? process?.env?.RTL_CONFIG_PATH : join(this.directoryName, '../..'); - const confFileFullPath = rtlConfFilePath + sep + 'RTL-Config.json'; if (!fs.existsSync(confFileFullPath)) { fs.writeFileSync(confFileFullPath, JSON.stringify(this.setDefaultConfig(), null, 2), 'utf-8'); } @@ -390,6 +390,7 @@ export class ConfigService { this.common.appConfig = config; } catch (err) { + this.logger.log({ selectedNode: this.common.selectedNode, level: 'ERROR', fileName: 'Config', msg: 'Config file path: ' + confFileFullPath }); this.logger.log({ selectedNode: this.common.selectedNode, level: 'ERROR', fileName: 'Config', msg: 'Something went wrong while configuring the node server: \n' + err }); throw new Error(err); } diff --git a/frontend/index.html b/frontend/index.html index 6357070a4..08937588c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -15,5 +15,5 @@