-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b42f28
commit e1a9595
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
class APIError(BaseException): | ||
"""General CKANAPI error""" | ||
pass | ||
|
||
|
||
class APIAuthorizationError(APIError): | ||
"""User credentials are invalid""" | ||
pass | ||
|
||
|
||
class APIBadGatewayError(APIError): | ||
"""Cannot connect to DCOR server""" | ||
pass | ||
|
||
|
||
class APIConflictError(APIError): | ||
"""Invalid payload to DCOR server""" | ||
pass | ||
|
||
|
||
class APIGatewayTimeoutError(APIError): | ||
"""Timeout due to network connection""" | ||
pass | ||
|
||
|
||
class APINotFoundError(APIError): | ||
"""Requested object not found on DCOR""" | ||
pass | ||
|
||
|
||
class APIOutdatedError(APIError): | ||
"""DCOR-Aid is outdated, the server requests a newer version""" | ||
pass | ||
|
||
|
||
class NoAPIKeyError(APIError): | ||
"""DCOR does not have an API key""" | ||
pass |