Skip to content

Commit 07a842c

Browse files
committed
Added some comments...
1 parent 1924d1a commit 07a842c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

blockscore/error/error.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
'InternalError': 500
99
}
1010

11-
# Exceptions
11+
# Generic Exception
1212
class BlockscoreError(Exception):
1313

1414
def __init__(self, message=None, json_body=None, http_status=None,
@@ -21,6 +21,7 @@ def __init__(self, message=None, json_body=None, http_status=None,
2121
self.json_body = json_body
2222

2323

24+
# Input could not be validated.
2425
class ValidationError(BlockscoreError):
2526

2627
def __init__(self, message=None, json_body=None, param=None,
@@ -36,6 +37,7 @@ def __init__(self, message=None, json_body=None, param=None,
3637
self.param = param
3738

3839

40+
# Required parameter missing
3941
class ParameterError(BlockscoreError):
4042

4143
def __init__(self, message=None, json_body=None, error_type=None):
@@ -46,6 +48,7 @@ def __init__(self, message=None, json_body=None, error_type=None):
4648
http_status=status_code, json_body=json_body)
4749

4850

51+
# Invalid API Key
4952
class AuthorizationError(BlockscoreError):
5053

5154
def __init__(self, message=None, json_body=None, error_type=None):
@@ -56,6 +59,7 @@ def __init__(self, message=None, json_body=None, error_type=None):
5659
http_status=status_code, json_body=json_body)
5760

5861

62+
# Tried to reference a nonexistent endpoint
5963
class NotFoundError(BlockscoreError):
6064

6165
def __init__(self, message=None, json_body=None, error_type=None):
@@ -66,6 +70,7 @@ def __init__(self, message=None, json_body=None, error_type=None):
6670
http_status=status_code, json_body=json_body)
6771

6872

73+
# Error on the Blockscore API
6974
class InternalServerError(BlockscoreError):
7075

7176
def __init__(self, message=None, json_body=None, error_type=None):

0 commit comments

Comments
 (0)