Microsoft.Azure.Common.CloudExceptionExtensions.GetRoutingRequestId C# (CSharp) Method

GetRoutingRequestId() public static method

public static GetRoutingRequestId ( this exception ) : string
exception this
return string
        public static string GetRoutingRequestId(this CloudException exception)
        {
            if (exception == null ||
               exception.Response == null ||
               exception.Response.Headers == null ||
               !exception.Response.Headers.Keys.Contains("x-ms-routing-request-id"))
            {
                return null;
            }

            return exception.Response.Headers["x-ms-routing-request-id"].FirstOrDefault();

        }
    }
CloudExceptionExtensions