mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 21:46:27 +00:00
Reduce transaction log payloads and retain diagnostic codes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const { logErrorCode } = require('../../helpers/log-fields');
|
||||
const winston = require('../../helpers/winston.logger');
|
||||
|
||||
// Endpoint diagnostik POS.
|
||||
@@ -23,7 +24,7 @@ const testAPI = async (req, res) => {
|
||||
} catch (error) {
|
||||
// create log
|
||||
winston.logger.error(
|
||||
`[ RESPONSE VALIDATE-REPLACEMENT ]: 500 internal server error - backend server | ${error.message}`
|
||||
`[ RESPONSE VALIDATE-REPLACEMENT ] code=500 error_code=${logErrorCode(error)}`
|
||||
);
|
||||
return res.status(200).json({
|
||||
code: '500',
|
||||
|
||||
Reference in New Issue
Block a user