Azure / Azure/azure-storage-python
expose AzureSigningError properly and make it self-explanatory
- Ngôn ngữ chính
- Python
- Star
- 343
- Fork
- 243
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### 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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra azure.storage.common._error, nơi AzureSigningError hiện đang được import, và so sánh việc exposed công khai của nó với azure.common.AzureConflictHttpError. Xác định là đã hoàn thành khi có một public import rõ ràng cho lỗi ký và một thông báo hữu ích hơn về lỗi thông tin xác thực, đồng thời kiểm tra các entry point hiện có để xử lý lỗi storage.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- cloud
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100