Replace logger.error with logger.exception to give more context in the log