add logger.debug to log debug message before response code 400