drivendataorg / drivendataorg/cloudpathlib
Wrap exceptions from cloud SDKs
- Vorherrschende Sprache
- Python
- Sterne
- 628
- Forks
- 88
- Ø Merge
- 17 Std. 28 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
The current implementation does not intercept exceptions thrown by the various underlying cloud apis. As a result, it is up to the user to import those from the underlying libraries if they want to handle them. This detracts from the abstraction provided by this library. Users have to write cloud-specific code to handle errors due to authentication or connection failures.
It would be nice if an attempt was made to catch these exceptions and wrap them with an appropriate exception type provided by this library.
I don't want to have to write code like this:
```python
from azure.core.exceptions import ClientAuthenticationError
from botocore.exceptions import NoCredentialsError
try:
path = CloudPath(somepath)
with path.open():
...
except (ClientAuthenticationError, NoCredentialsError,...):
```
And if I need to worry about what implementation libraries are installed the code becomes even more horrible.
I would rather have cloudpathlib intercept those exceptions and wrap them with its own exceptions so I could write something like:
```python
from cloudpathlib import AuthenticationError
try:
path = CloudPath(somepath)
with path.open():
...
except AuthenticationError:
```
Beitragsleitfaden
Rechercherichtung
Beginne bei CloudPath und verfolge, wo die zugrunde liegenden Cloud-APIs Authentifizierungs- und Verbindungsausnahmen auslösen. Ermittle die Ausnahme-Kategorien auf Bibliotheksebene und die Provider-Zuordnungen und überprüfe anschließend, dass Aufrufer diese Fehler behandeln können, ohne cloud-spezifische SDK-Ausnahmen zu importieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, azure, google-cloud, python
- Bereich
- cloud
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100