|
2 | 2 | # pylance isn't able to find that. So this is an exceptions module with only
|
3 | 3 | # `__init__.pyi` to work around pylance's bug.
|
4 | 4 |
|
5 |
| -class ObstoreError(Exception): |
| 5 | +class BaseError(Exception): |
6 | 6 | """The base exception class"""
|
7 | 7 |
|
8 |
| -class GenericError(ObstoreError): |
| 8 | +class GenericError(BaseError): |
9 | 9 | """A fallback error type when no variant matches."""
|
10 | 10 |
|
11 |
| -class NotFoundError(ObstoreError): |
| 11 | +class NotFoundError(BaseError): |
12 | 12 | """Error when the object is not found at given location."""
|
13 | 13 |
|
14 |
| -class InvalidPathError(ObstoreError): |
| 14 | +class InvalidPathError(BaseError): |
15 | 15 | """Error for invalid path."""
|
16 | 16 |
|
17 |
| -class JoinError(ObstoreError): |
| 17 | +class JoinError(BaseError): |
18 | 18 | """Error when `tokio::spawn` failed."""
|
19 | 19 |
|
20 |
| -class NotSupportedError(ObstoreError): |
| 20 | +class NotSupportedError(BaseError): |
21 | 21 | """Error when the attempted operation is not supported."""
|
22 | 22 |
|
23 |
| -class AlreadyExistsError(ObstoreError): |
| 23 | +class AlreadyExistsError(BaseError): |
24 | 24 | """Error when the object already exists."""
|
25 | 25 |
|
26 |
| -class PreconditionError(ObstoreError): |
| 26 | +class PreconditionError(BaseError): |
27 | 27 | """Error when the required conditions failed for the operation."""
|
28 | 28 |
|
29 |
| -class NotModifiedError(ObstoreError): |
| 29 | +class NotModifiedError(BaseError): |
30 | 30 | """Error when the object at the location isn't modified."""
|
31 | 31 |
|
32 |
| -class PermissionDeniedError(ObstoreError): |
| 32 | +class PermissionDeniedError(BaseError): |
33 | 33 | """
|
34 | 34 | Error when the used credentials don't have enough permission
|
35 | 35 | to perform the requested operation
|
36 | 36 | """
|
37 | 37 |
|
38 |
| -class UnauthenticatedError(ObstoreError): |
| 38 | +class UnauthenticatedError(BaseError): |
39 | 39 | """Error when the used credentials lack valid authentication."""
|
40 | 40 |
|
41 |
| -class UnknownConfigurationKeyError(ObstoreError): |
| 41 | +class UnknownConfigurationKeyError(BaseError): |
42 | 42 | """Error when a configuration key is invalid for the store used."""
|
0 commit comments