Skip to content

Commit 5129c56

Browse files
committed
add error documentation
1 parent 98bd716 commit 5129c56

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

mystbin/errors.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,20 @@ class MystbinException(Exception):
3030
""" Error when interacting with Mystbin. """
3131

3232
class APIError(MystbinException):
33+
"""
34+
Exception relationg to the API of Mystbin.
35+
36+
Attributes
37+
----------
38+
status_code: :class:`int`
39+
The HTTP Status code return from the API.
40+
message: :class:`str`
41+
The Message supplied with the HTTP status code from the API.
42+
"""
43+
3344
__slots__ = ("status_code", "message")
34-
def __init__(self, status_code: int, message: str) -> None:
45+
46+
def __init__(self, status_code: int, message: str):
3547
self.status_code = status_code
3648
self.message = message
3749

0 commit comments

Comments
 (0)