mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-17 03:00:13 +00:00
Added error handling for changes to utils.py
This commit is contained in:
parent
2648f208da
commit
2f8bd44687
1 changed files with 17 additions and 1 deletions
18
src/pluralkit/errors.py
Normal file → Executable file
18
src/pluralkit/errors.py
Normal file → Executable file
|
|
@ -45,6 +45,21 @@ class InvalidAvatarURLError(PluralKitError):
|
||||||
super().__init__("Invalid image URL.")
|
super().__init__("Invalid image URL.")
|
||||||
|
|
||||||
|
|
||||||
|
class AvatarHTTPError(PluralKitError):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__("Avatar could not be retrieved. ")
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidAvatarContentTypeError(PluralKitError):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__("Avatar file type disallowed. (Types: jpg, png, gif)")
|
||||||
|
|
||||||
|
|
||||||
|
class AvatarFileSizeTooLargeError(PluralKitError):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__("Avatar file size too large. (Limit: 1MB)")
|
||||||
|
|
||||||
|
|
||||||
class AccountInOwnSystemError(PluralKitError):
|
class AccountInOwnSystemError(PluralKitError):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__("That account is already linked to your own system.")
|
super().__init__("That account is already linked to your own system.")
|
||||||
|
|
@ -101,4 +116,5 @@ class InvalidTimeZoneError(PluralKitError):
|
||||||
|
|
||||||
class TupperboxImportError(PluralKitError):
|
class TupperboxImportError(PluralKitError):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__("Invalid Tupperbox file.")
|
super().__init__("Invalid Tupperbox file.")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue