From cb2062ae2fbd8e8881de26561efddad1f272e065 Mon Sep 17 00:00:00 2001 From: anandsahil Date: Mon, 22 Jul 2019 17:31:24 +0200 Subject: [PATCH] remove eCollect from constant and minor verbose error handeling --- lib/BankLetter.js | 4 ++-- lib/Client.js | 2 +- lib/consts.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/BankLetter.js b/lib/BankLetter.js index 0161324..46932d8 100644 --- a/lib/BankLetter.js +++ b/lib/BankLetter.js @@ -63,9 +63,9 @@ module.exports = class BankLetter { try { fs.writeFileSync(path, letter); - console.log('Data written to file'); + console.log(`Data written to file on path '${path}'`); } catch (error) { - console.log(error); + console.error(`error while writing bank letter to path '${path}' with error ${error}`); throw error; } return new Promise(resolve => resolve(true)); diff --git a/lib/Client.js b/lib/Client.js index 576a9ec..5ce4898 100644 --- a/lib/Client.js +++ b/lib/Client.js @@ -42,7 +42,7 @@ module.exports = class Client { throw new Error('passphrase is requierd'); if (!keyStorage || typeof keyStorage.read !== 'function' || typeof keyStorage.write !== 'function') - throw new Error('keyStorage implemntation missing or wrong'); + throw new Error('keyStorage implementation missing or wrong'); this.url = url; this.partnerId = partnerId; diff --git a/lib/consts.js b/lib/consts.js index 12616f5..293287c 100644 --- a/lib/consts.js +++ b/lib/consts.js @@ -2,7 +2,7 @@ const packageJson = require('../package.json'); -const name = 'eCollect Node Ebics Client'; +const name = 'Node Ebics Client'; const { version } = packageJson; const orderOperations = { ini: 'INI',