private void SetFailureData(SerialSyncResult run, HttpResponseMessage response, IHubSpotContact hubSpotContact, int contactLength, int currentContactIndex) { run.FailureCount++; var failure = new SerialSyncFailure { HttpStatusCode = response.StatusCode, Exception = _http.GetResponseContent <HubSpotException>(response), HubSpotContact = hubSpotContact }; run.Failures.Add(failure); LogContactFailure(failure, hubSpotContact, currentContactIndex, contactLength); }
private void NullFailedContact(SerialSyncFailure failure) { failure.HubSpotContact = null; }