Handle EResult.Fail in inventory request

This commit is contained in:
Łukasz Domeradzki 2024-04-04 19:08:23 +02:00
parent 477cc8ba74
commit 54e76cf559
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA
2 changed files with 2 additions and 0 deletions

View file

@ -239,6 +239,7 @@ public sealed class ArchiHandler : ClientMsgHandler {
ArchiLogger.LogGenericDebug(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, serviceMethodResponse.Result));
continue;
case EResult.Fail:
case EResult.NoMatch:
// Expected failures that we're not going to retry
throw new TimeoutException(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, serviceMethodResponse.Result));

View file

@ -308,6 +308,7 @@ public sealed class ArchiWebHandler : IDisposable {
case EResult.Timeout:
// Expected failures that we should be able to retry
continue;
case EResult.Fail:
case EResult.NoMatch:
// Expected failures that we're not going to retry
throw new HttpRequestException(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, response.Content.ErrorText), null, response.StatusCode);