diff --git a/DigiCertSymCaProxy/Client/DigiCertSymClient.cs b/DigiCertSymCaProxy/Client/DigiCertSymClient.cs index 27e164d..4187335 100644 --- a/DigiCertSymCaProxy/Client/DigiCertSymClient.cs +++ b/DigiCertSymCaProxy/Client/DigiCertSymClient.cs @@ -185,32 +185,37 @@ public async Task SubmitQueryOrderRequestAsync(BlockingCollection 5) - throw new RetryCountExceededException( - $"5 consecutive failures to {resp.RequestMessage.RequestUri}"); - continue; + if (!resp.IsSuccessStatusCode) + { + var responseMessage = resp.Content.ReadAsStringAsync().Result; + //igngore missing Certificate in search 404 errors + if (!responseMessage.Contains("entity_not_found")) + { + Logger.Error( + $"Failed Request to Digicert mPKI. Retrying request. Status Code {resp.StatusCode} | Message: {responseMessage}"); + retryCount++; + if (retryCount > 5) + throw new RetryCountExceededException( + $"5 consecutive failures to {resp.RequestMessage.RequestUri}"); } + break; //Seat has no certs move on to the next seat + } var response = JsonConvert.DeserializeObject( await resp.Content.ReadAsStringAsync()); @@ -239,7 +244,8 @@ public async Task SubmitQueryOrderRequestAsync(BlockingCollection