Skip to content

Commit

Permalink
#52 add adyen request body to a separate field
Browse files Browse the repository at this point in the history
  • Loading branch information
LEQADA committed Apr 23, 2019
1 parent 4c0ee0c commit 99aca3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions notification/src/api/notification/notification.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ async function handleNotification (request, response) {
200,
{ 'Content-Type': 'application/json' },
JSON.stringify({ notificationResponse: '[accepted]' }))
} catch (e) {
logger.error(e,
`Unexpected exception occurred. Received payload from Adyen: ${body}`)
} catch (err) {
logger.error({ adyenRequestBody: `${body}`, err },
'Unexpected exception occurred.')
return httpUtils.sendResponse(response, 500)
}
}
Expand Down
3 changes: 2 additions & 1 deletion notification/src/utils/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ function getLogger () {
obj = bunyan.createLogger({
name: NOTIFICATION_MODULE_NAME,
stream: process.stdout,
level: logLevel || bunyan.INFO
level: logLevel || bunyan.INFO,
serializers: bunyan.stdSerializers
})
}
return obj
Expand Down

0 comments on commit 99aca3f

Please sign in to comment.