/// <summary>
        /// Check if a request to provision a Public IP failed because of a race condition
        /// between when we created the server and when we requested the IP
        /// i.e. The RackConnect API asked for the server details from the server API and got back a 404
        /// </summary>
        private static bool AssignIPFailedDueToServerCreationRaceCondition(FlurlHttpException ex)
        {
            if (ex.Call.HttpStatus != HttpStatusCode.Conflict)
                return false;

            string errorMessage = ex.GetResponseString();
            return Regex.IsMatch(errorMessage, "Cloud Server .* (unprocessable|exist).*");
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the MetasysNotFoundException
 /// </summary>
 /// <param name="inner"></param>
 public MetasysHttpNotFoundException(Flurl.Http.FlurlHttpException inner) :
     base(inner)
 {
 }