refs #6915 test into dev #2093

Merged
juan merged 23 commits from test into dev 2024-02-23 18:05:46 +00:00
1 changed files with 7 additions and 1 deletions
Showing only changes of commit 277bcafd89 - Show all commits

View File

@ -86,7 +86,13 @@ module.exports = Self => {
const getLabelResponse = await sendXmlDoc('getLabel', {mrw, shipmentId}, 'text/xml'); const getLabelResponse = await sendXmlDoc('getLabel', {mrw, shipmentId}, 'text/xml');
const file = getTextByTag(getLabelResponse, 'EtiquetaFile'); const file = getTextByTag(getLabelResponse, 'EtiquetaFile');
await models.Expedition.updateAll({id: expeditionFk}, {externalId: shipmentId}, myOptions); try {
await models.Expedition.updateAll({id: expeditionFk}, {externalId: shipmentId}, myOptions);
await myOptions.transaction.commit();
} catch (error) {
await myOptions.transaction.rollback();
throw new UserError(`Cant update the expedition`);
}
return file; return file;
}; };