Improve error handling when updating currency exchange (#5939)

- Suppress output for expected error conditions
This commit is contained in:
Oliver 2023-11-20 13:14:16 +11:00 committed by GitHub
parent 52b01b09bf
commit 829d427a76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -553,7 +553,7 @@ def update_exchange_rates(force: bool = False):
# Record successful task execution
record_task_success('update_exchange_rates')
except OperationalError:
except (AppRegistryNotReady, OperationalError, ProgrammingError):
logger.warning("Could not update exchange rates - database not ready")
except Exception as e: # pragma: no cover
logger.exception("Error updating exchange rates: %s", str(type(e)))