Skip to content

Commit 9273601

Browse files
author
Vikas Agarwal
committed
fixing possible error in log statements
1 parent f564ac1 commit 9273601

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/services/busApi.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _ from 'lodash';
12
import config from 'config';
23

34
const Promise = require('bluebird');
@@ -54,8 +55,8 @@ function createEvent(topic, payload, logger) {
5455
payload,
5556
}).then((resp) => {
5657
logger.debug('Sent event to bus-api');
57-
logger.debug(`Sent event to bus-api [data]: ${resp}`);
58-
logger.debug(`Sent event to bus-api [status]: ${resp.status}`);
58+
logger.debug(`Sent event to bus-api [data]: ${_.get(resp, 'data')}`);
59+
logger.debug(`Sent event to bus-api [status]: ${_.get(resp, 'status')}`);
5960
}).catch((error) => {
6061
logger.debug('Error sending event to bus-api');
6162
if (error.response) {

0 commit comments

Comments
 (0)