-
Notifications
You must be signed in to change notification settings - Fork 4
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
d14d14c
commit 766221e
Showing
3 changed files
with
58 additions
and
15 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,18 +1,29 @@ | ||
import logging | ||
|
||
log = logging.getLogger() | ||
|
||
|
||
class ApiError(Exception): | ||
pass | ||
def __init__(self): | ||
log.info(" ApiError(): An error has been raised.") | ||
|
||
|
||
class MissingRecordError(ApiError): | ||
pass | ||
def __init__(self): | ||
log.info(" MissingRecordError(): Record not found, DB session Closed") | ||
|
||
|
||
|
||
class BadFilterError(ApiError): | ||
pass | ||
def __init__(self): | ||
log.info(" BadFilterError(): Bad filter supplied") | ||
|
||
|
||
class AuthenticationError(ApiError): | ||
pass | ||
def __init__(self): | ||
log.info(" AuthenticationError(): Error authenticating consumer") | ||
|
||
|
||
class BadRequestError(ApiError): | ||
pass | ||
def __init__(self): | ||
log.info(" BadRequestError(): Bad request by Consumer") |
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