Nattrass
Nattrass

Reputation: 1293

Is it possible to define a custom error when accessing blobs from the Azure Blob Service using Shared Access Signatures?

I have a client application that displays images retrieved from blob storage. The blobs are protected by SAS signatures. When access to the blob expires the blob service returns an error message as follows..

<Error>
    <Code>AuthenticationFailed</Code>
    <Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:399b5e5d-d01e-0022-0813-cb9080000000 Time:2020-01-14T19:45:06.9253703Z
    </Message>
    <AuthenticationErrorDetail>Signed expiry time [Fri, 22 Nov 2019 11:27:07 GMT] must be after signed start time [Tue, 14 Jan 2020 19:45:06 GMT]
    </AuthenticationErrorDetail>
</Error>

Is it possible to customise this error message returned by the blob service?

Upvotes: 0

Views: 379

Answers (1)

Thiago Custodio
Thiago Custodio

Reputation: 18387

Unless you use an API to serve the blobs, you won't be able to intercept/change the response from Azure Storage Service.

Upvotes: 4

Related Questions