Azure / Azure/azure-storage-python

expose AzureSigningError properly and make it self-explanatory

未关闭
#565 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
343
派生
243
PR 合并指标
30 天内没有已合并 PR

描述

### Which service(blob, file, queue) does this issue concern?

Any.

### Which version of the SDK was used? Please provide the output of `pip freeze`.

asn1crypto==0.24.0
astroid==2.2.5
azure-common==1.1.18
azure-functions==1.0.0b3
azure-functions-worker==1.0.0b4
azure-storage-blob==1.5.0
azure-storage-common==1.4.0
azure-storage-queue==1.4.0
certifi==2019.3.9
cffi==1.12.2
chardet==3.0.4
colorama==0.4.1
cryptography==2.6.1
grpcio==1.14.2
grpcio-tools==1.14.2
idna==2.8
isort==4.3.16
lazy-object-proxy==1.3.1
mccabe==0.6.1
protobuf==3.7.0
pycparser==2.19
pylint==2.3.1
python-dateutil==2.8.0
requests==2.21.0
six==1.12.0
typed-ast==1.3.1
urllib3==1.24.1
wrapt==1.11.1

### What problem was encountered?

AzureSigningError is the error class associated with connections to Azure Storage failing due to providing the wrong account credentials. Users of the SDK will come across this error being raised frequently and should thus be encouraged to catch it with `try … except` specifically.

AzureSigningError is not really exposed for easy use, requiring an import as such

```python
from azure.storage.common._error import AzureSigningError
```

Like other errors that can occur specifically when performing API operations, it should have a more obvious import, comparable to

```python
from azure.common import AzureConflictHttpError
```

Also, the error message that comes with the object is not really helpful. Providing incorrect storage account credentials results in "Incorrect Padding". There is no HTTP response code associated with the error object (like with `azure.common.AzureHttpError`). It would really help if error handling in the storage SDK behaves in the same way as with `azure.common`.

### Have you found a mitigation/solution?

No.
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.

贡献指南

打开贡献指南

调研方向

首先检查当前导入 AzureSigningError 的 azure.storage.common._error,并将其公开暴露方式与 azure.common.AzureConflictHttpError 进行比较。将完成定义为:为签名错误提供清晰的公开导入,并提供更有用的凭据失败消息,同时检查现有的存储错误处理入口。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
cloud
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。