Skip to content

Commit

Permalink
fix: [#6861]TeamsSSOTokenExchangeMiddleware.DeduplicatedTokenExchange…
Browse files Browse the repository at this point in the history
…IdAsync fails on BlobStorage ETag validation (#6867)

* add catch to capture 412 error in BlobsStorage

* use HttpStatusCode
  • Loading branch information
JhontSouth authored Jan 14, 2025
1 parent e5a4582 commit 5c443c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/Microsoft.Bot.Builder.Azure.Blobs/BlobsStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ internal BlobsStorage(BlobContainerClient containerClient, JsonSerializer jsonSe
$"An error occurred while trying to write an object. The underlying '{BlobErrorCode.InvalidBlockList}' error is commonly caused due to concurrently uploading an object larger than 128MB in size.",
ex);
}
catch (RequestFailedException ex)
when (ex.Status == (int)HttpStatusCode.PreconditionFailed)
{
throw new InvalidOperationException($"Etag conflict: {ex.Message}");
}
}
}

Expand Down

0 comments on commit 5c443c4

Please sign in to comment.