tango-app-api-audit 3.6.40 → 3.6.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1108,13 +1108,14 @@ export async function saveBinary( req, res ) {
|
|
|
1108
1108
|
try {
|
|
1109
1109
|
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
1110
1110
|
let clientConfig;
|
|
1111
|
+
const inputData = req.body;
|
|
1111
1112
|
if ( inputData?.moduleType === 'unattended-customer' ) {
|
|
1112
1113
|
clientConfig = await findOneClient( { 'auditConfigs.traxQueueName.unattendedCustomer': inputData?.queueName }, { clientId: 1, auditConfigs: 1 } );
|
|
1113
1114
|
}
|
|
1114
1115
|
const isZoneAudit = clientConfig?.auditConfigs?.unattendedAuditZone || false;
|
|
1115
1116
|
const url = JSON.parse( process.env.URL );
|
|
1116
1117
|
const sqs = JSON.parse( process.env.SQS );
|
|
1117
|
-
|
|
1118
|
+
|
|
1118
1119
|
const isoDate = req.userAudit?.startTime;
|
|
1119
1120
|
const currentTime = dayjs();
|
|
1120
1121
|
const isoDateTime = dayjs( isoDate );
|
|
@@ -1837,7 +1838,7 @@ export async function saveBinary( req, res ) {
|
|
|
1837
1838
|
break;
|
|
1838
1839
|
}
|
|
1839
1840
|
} catch ( error ) {
|
|
1840
|
-
const err = error.
|
|
1841
|
+
const err = error.message || error.response?.data || error.response?.status ||'Internal Server Error';
|
|
1841
1842
|
logger.error( { error: error, data: req.body, function: 'saveBinary' } );
|
|
1842
1843
|
return res.sendError( err, 500 );
|
|
1843
1844
|
}
|