Use logger.exception instead of logger.error when catch a exception