Open mattdurak opened 11 months ago
Hi @mattdurak there are a few things you can check in the exception, and depending on which API you're calling, some of the fields may be empty.
try
{
auto properties = blobClient.Download().Value;
}
catch (Azure::Storage::StorageException& e) {
std::cout << e.ReasonPhrase << std::endl;
std::cout << e.RequestId << std::endl;
std::cout << e.ErrorCode << std::endl;
std::cout << e.Message << std::endl;
for (const auto& i : e.AdditionalInformation)
{
std::cout << i.first << ": " << i.second << std::endl;
}
}
If you cannot figure out the problem with the output from above code, you can contact us with the RequestId
field, we can help you check from server-side.
Query/Question
According to these docs, https://techcommunity.microsoft.com/t5/azure-paas-blog/troubleshooting-the-403-error-for-user-delegation-sas-in-azure/ba-p/3294999 I should be able to troubleshoot 403 authentication errors by looking at the AuthenticationErrorDetail.
However, the exception in this SDK (StorageException) does not seem to have such a field.
When I get exceptions like this: "403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature." I don't also get the message like in the link above that tells me what was wrong with the authorization header.
Why is this not a Bug or a feature Request?
I'm not sure if this is a bug or just missing documentation on how to get the AuthenticationErrorDetail from StorageException.
Setup (please complete the following information if applicable):
Version of the Library used 1.10.1
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report