Tom-Newton commented on code in PR #38505:
URL: https://github.com/apache/arrow/pull/38505#discussion_r1386223441


##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -146,9 +148,8 @@ Status ValidateFilePath(const AzurePath& path) {
   return Status::OK();
 }
 
-Status ErrorToStatus(const std::string& prefix,
-                     const Azure::Storage::StorageException& exception) {
-  return Status::IOError(prefix, " Azure Error: ", exception.what());
+bool ContainerOrBlobNotFound(const Azure::Storage::StorageException& 
exception) {

Review Comment:
   Yeah I'm having second thoughts about this too, I extracted it to a helper 
function when I thought there was an extra status code I could check to 
distinguish container and blob not found from other 404s 
https://github.com/Azure/azure-sdk-for-cpp/blob/e94719131d2ba0e24327f838b74e153af692a46c/sdk/storage/azure-storage-blobs/src/blob_client.cpp#L793-L795.
 
   
   Unfortunately it seems blob storage actually doesn't return these error 
codes consistently on all endpoints so we have to assume 404s are always 
contaner or blob not found. 
   
   I will revert back to using `exception.StatusCode == 
Azure::Core::Http::HttpStatusCode::NotFound` inline. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to