Skip to content

Commit

Permalink
PAGOPA-1695 adding catch in scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoRuzzier committed May 8, 2024
1 parent a599a7a commit d653c33
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.azure.storage.queue.models.QueueMessageItem;
import com.microsoft.azure.storage.StorageException;
import feign.FeignException;
import it.gov.pagopa.payments.endpoints.validation.exceptions.PartnerValidationException;
import it.gov.pagopa.payments.entity.ReceiptEntity;
import it.gov.pagopa.payments.exception.AppError;
import it.gov.pagopa.payments.exception.AppException;
Expand Down Expand Up @@ -135,6 +136,10 @@ public void handlingXml (String failureBody, XPath xpath, QueueMessageItem queue
Duration.ofSeconds(queueUpdateInvisibilityTime),
null,
Context.NONE);
} catch (PartnerValidationException e) {
// { PAA_RECEIPT_DUPLICATA, PAA_PAGAMENTO_SCONOSCIUTO }
log.info("[paSendRT] Retry failed {} [fiscalCode={},noticeNumber={}]\",\n", e.getMessage(), idPA, noticeNumber);
queueClient.deleteMessage(queueMessageItem.getMessageId(), queueMessageItem.getPopReceipt());
}
}

Expand Down

0 comments on commit d653c33

Please sign in to comment.