-
Notifications
You must be signed in to change notification settings - Fork 28
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
Tuen Lee
committed
Dec 23, 2023
1 parent
ed1920b
commit 6980dd2
Showing
5 changed files
with
103 additions
and
71 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class PolestarApiException(Exception): | ||
"""Base class for exceptions in this module.""" | ||
|
||
|
||
class PolestarAuthException(Exception): | ||
"""Base class for exceptions in Auth module.""" | ||
error_code: int = None | ||
message: str = None | ||
|
||
def __init__(self, message, error_code) -> None: | ||
super().__init__(message) | ||
self.error_code = error_code | ||
return None | ||
|
||
|
||
class PolestarNotAuthorizedException(Exception): | ||
"""Exception for unauthorized call""" | ||
|
||
|
||
class PolestarNoDataException(Exception): | ||
"""Exception for no data""" |
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