Replace raise error with logger.warn.