feat(MED-85): update dispatch order to medipost retry

This commit is contained in:
2025-08-27 08:04:37 +03:00
parent da8b5aa59f
commit 2b2a0b8bc4
7 changed files with 141 additions and 6 deletions

View File

@@ -709,11 +709,12 @@ export async function sendOrderToMedipost({
try {
await sendPrivateMessage(orderXml);
} catch (e) {
const isMedipostError = e instanceof MedipostValidationError;
await logMedipostDispatch({
medusaOrderId,
isSuccess: false,
isMedipostError: e instanceof MedipostValidationError,
errorMessage: e instanceof MedipostValidationError ? e.response : undefined,
isMedipostError,
errorMessage: isMedipostError ? e.response : undefined,
});
throw e;
}