зеркало из https://github.com/microsoft/mwt-ds.git
Add 404 and 503 to targeted exclusions from hard failure at Download stage of Crawl
This commit is contained in:
Родитель
a8874661f7
Коммит
bf9fccafdd
|
@ -116,8 +116,18 @@ namespace Microsoft.DecisionService.Crawl
|
|||
}
|
||||
catch (WebException we)
|
||||
{
|
||||
if ((we.Response as HttpWebResponse)?.StatusCode == HttpStatusCode.Forbidden)
|
||||
continue;
|
||||
HttpWebResponse httpResponse = we.Response as HttpWebResponse;
|
||||
if (httpResponse != null)
|
||||
{
|
||||
// Ignore known cases where crawl fails due to error on the crawl-target side - these should not
|
||||
// cause a hard failure on our end.
|
||||
if (httpResponse.StatusCode == HttpStatusCode.Forbidden ||
|
||||
httpResponse.StatusCode == HttpStatusCode.NotFound ||
|
||||
httpResponse.StatusCode == HttpStatusCode.ServiceUnavailable)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче