Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet Job, don't rethrow exceptions if blob is not found #10188

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Catalog/Persistence/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Storage.Blobs.Models;
using Newtonsoft.Json;
using NuGetGallery;

Expand Down Expand Up @@ -125,6 +127,10 @@ public async Task DeleteAsync(Uri resourceUri, CancellationToken cancellationTok
{
await OnDeleteAsync(resourceUri, deleteRequestOptions, cancellationToken);
}
catch (RequestFailedException ex) when (ex.ErrorCode == BlobErrorCode.BlobNotFound)
{
// Ignore this same as CloudBlobStorageException for below.
}
catch (CloudBlobStorageException e)
{
WebException webException = e.InnerException as WebException;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remove CloudBlobStorageException handling part. There could be some places we still didn't complete SDK migration. Once we have confidence, then we can remove it.

Expand Down