diff --git a/src/external/essRequests/requestDataHelper.js b/src/external/essRequests/requestDataHelper.js index 1720258..7dcd704 100644 --- a/src/external/essRequests/requestDataHelper.js +++ b/src/external/essRequests/requestDataHelper.js @@ -1,12 +1,9 @@ const Promise = require('bluebird'); const fs = require('fs-extra'); -<<<<<<< HEAD const logger = require('@bananabread/sumologic-winston-logger'); const { getRichError } = require('@bananabread/response-helper'); -======= ->>>>>>> 9f20540672076bbb5e27feafad0401b9a38fb699 const { anaxContainersStorageDir } = require('../../configuration/config'); const { shortenNodeId } = require('../../util/nodeUtil'); @@ -32,31 +29,19 @@ const getRequestData = (nodeId, agreementId) => Promise.resolve() authDataPromises.push(fs.access(essSocketFilePath) .then(() => essSocketFilePath) .catch((err) => { -<<<<<<< HEAD throw getRichError('System', 'Failed to find/access to socketPath for nodeId', { nodeId, essSocketFilePath }, err, 'error', correlationId); -======= - throw new Error(`Failed to find/access to socketPath for nodeId, error: ${err}`); ->>>>>>> 9f20540672076bbb5e27feafad0401b9a38fb699 })); authDataPromises.push(fs.readJSON(authKeyFilePath) .catch((err) => { -<<<<<<< HEAD throw getRichError('System', 'ESS Auth key file cannot be read', { nodeId, authKeyFilePath, correlationId }, err, 'error', correlationId); -======= - throw new Error(`ESS Auth key file cannot be read, error: ${err}`); ->>>>>>> 9f20540672076bbb5e27feafad0401b9a38fb699 }) .then(({ id, token }) => Buffer.from(`${id}:${token}`).toString('base64'))); authDataPromises.push(fs.readFile(certFilePath) .then((content) => { if (!content) { -<<<<<<< HEAD throw getRichError('System', 'ESS Cert file does not contain anything', { nodeId, certFilePath, correlationId }, null, 'error', correlationId); -======= - throw new Error('ESS Cert file does not contain anything'); ->>>>>>> 9f20540672076bbb5e27feafad0401b9a38fb699 } let fetchedCert; diff --git a/src/external/essRequests/socketHelper.js b/src/external/essRequests/socketHelper.js index 12e6947..0a161c1 100644 --- a/src/external/essRequests/socketHelper.js +++ b/src/external/essRequests/socketHelper.js @@ -17,11 +17,7 @@ const dataRequest = (nodeId, request, correlationId) => new Promise((resolve, re }); res.on('error', (error) => { -<<<<<<< HEAD reject(getRichError('System', 'Received error from ESS socket', { nodeId, request, correlationId }, error, 'error', correlationId)); -======= - reject(new Error(`Received error from ESS socket, error: ${error}`)); ->>>>>>> 9f20540672076bbb5e27feafad0401b9a38fb699 }); res.on('close', () => { @@ -39,10 +35,6 @@ const dataRequest = (nodeId, request, correlationId) => new Promise((resolve, re code: res.statusCode, message: res.statusMessage, }; -<<<<<<< HEAD -======= - ->>>>>>> 9f20540672076bbb5e27feafad0401b9a38fb699 resolve(result); }); }; @@ -61,11 +53,7 @@ const fileDownloadRequest = (nodeId, outputFilePath, request) => new Promise((re }); res.on('error', (error) => { -<<<<<<< HEAD reject(getRichError('System', 'Received error from ESS socket', { nodeId, request, correlationId }, error, 'error', correlationId)); -======= - reject(new Error(`Received error from ESS socket, error: ${error}`)); ->>>>>>> 9f20540672076bbb5e27feafad0401b9a38fb699 }); res.on('close', () => {