From df3b6b5317690c8aa5230c940e21f9dd6b166cd3 Mon Sep 17 00:00:00 2001 From: Dirk Doesburg Date: Thu, 26 Oct 2023 08:36:14 +0200 Subject: [PATCH] Handle Administration.Error when updating contacts --- website/moneybirdsynchronization/services.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/moneybirdsynchronization/services.py b/website/moneybirdsynchronization/services.py index 959a796be..2c51393bf 100644 --- a/website/moneybirdsynchronization/services.py +++ b/website/moneybirdsynchronization/services.py @@ -264,7 +264,11 @@ def _sync_contacts_with_outdated_mandates(): ) for contact in contacts: - create_or_update_contact(contact.member) + try: + create_or_update_contact(contact.member) + except Administration.Error as e: + logger.exception("Moneybird synchronization error: %s", e) + send_sync_error(e, contact.member) def _try_create_or_update_external_invoices(queryset):