static int Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.Error.WriteLine("ErrorDetails <task-id>");
                return -1;
            }

            string accountName = Environment.GetEnvironmentVariable("ACCOUNT_NAME");
            string accountKey = Environment.GetEnvironmentVariable("ACCOUNT_KEY");
            CloudMediaContext cloudMediaContext = new CloudMediaContext(accountName, accountKey);

            string taskId = args[0];

            ITask task = cloudMediaContext.FindTaskById(taskId);

            foreach (var errorDetail in task.ErrorDetails)
            {
                Console.WriteLine("{0}\t{1}", errorDetail.Code, errorDetail.Message);
            }

            return 0;
        }