Skip to content

blob/azureblob: handle precondition error#3635

Merged
vangent merged 1 commit intogoogle:masterfrom
SoMuchForSubtlety:azure-blob-precondition-error
Nov 5, 2025
Merged

blob/azureblob: handle precondition error#3635
vangent merged 1 commit intogoogle:masterfrom
SoMuchForSubtlety:azure-blob-precondition-error

Conversation

@SoMuchForSubtlety
Copy link
Contributor

@SoMuchForSubtlety SoMuchForSubtlety commented Nov 5, 2025

Azure returns the following error when a request fails due to a conflicting precondition

<?xml version="1.0" encoding="utf-8"?>
<Error>
    <Code>BlobAlreadyExists</Code>
    <Message>The specified blob already exists.
        RequestId:xyz-123
        Time:2025-11-05T08:28:21.2817469Z</Message>
</Error>

This needs to be converted to the generic FailedPrecondition error so it can be handled properly.

@google-cla
Copy link

google-cla bot commented Nov 5, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@SoMuchForSubtlety SoMuchForSubtlety force-pushed the azure-blob-precondition-error branch from 4b91e85 to 7f2292d Compare November 5, 2025 14:18
@SoMuchForSubtlety
Copy link
Contributor Author

I couldn't find an obvious place to add a test, please point me in the right direction if I should add one.

@SoMuchForSubtlety SoMuchForSubtlety marked this pull request as ready for review November 5, 2025 14:32
@vangent vangent merged commit eff724a into google:master Nov 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants