public static string GetRequestId(this CloudException exception)
{
IEnumerable<string> requestIds;
if (exception.Response != null
&& exception.Response.Headers != null
&& exception.Response.Headers.TryGetValue("x-ms-request-id", out requestIds))
{
return string.Join(";", requestIds);
}
return string.Empty;
}
}