Removing console.log and fixing bug of error result in cache