fix(bible): added error handling for if API.Bible is down
This commit is contained in:
parent
5d68f91169
commit
220e8da790
2 changed files with 20 additions and 1 deletions
|
@ -16,7 +16,7 @@ class Unauthorized(Exception):
|
|||
def __init__(
|
||||
self,
|
||||
message: str = error(
|
||||
"The API key for API.bible is missing or invalid. Please report this to the bot owner.\nIf you are the bot owner, please check the documentation [here](<https://seacogs.coastalcommits.com/bible/#setup>)."
|
||||
"The API key for API.Bible is missing or invalid. Please report this to the bot owner.\nIf you are the bot owner, please check the documentation [here](<https://seacogs.coastalcommits.com/bible/#setup>)."
|
||||
),
|
||||
):
|
||||
super().__init__(message)
|
||||
|
@ -30,3 +30,12 @@ class NotFound(Exception):
|
|||
):
|
||||
super().__init__(message)
|
||||
self.message = message
|
||||
|
||||
|
||||
class ServiceUnavailable(Exception):
|
||||
def __init__(
|
||||
self,
|
||||
message: str = error("The API.Bible service is currently unavailable."),
|
||||
):
|
||||
super().__init__(message)
|
||||
self.message = message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue