Skip to content

Commit ab579c4

Browse files
committed
Updated README.md to reflect new error classes
1 parent 86e3437 commit ab579c4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,24 @@ score = self.client.question_set.score(verif_id, qset_id, [
7171
score = score.body
7272
```
7373

74+
## Exceptions and Errors
75+
76+
### Error Description
77+
78+
* The generic error class is BlockscoreError. All other types of errors are derived from BlockscoreError.
79+
* Errors contain information such as the HTTP response code, a short message describing the error, the type of error, and if applicable, the parameter and error code at issue.
80+
* Also available in the error object is the full JSON text representation of the data.
81+
82+
### Error Types
83+
84+
* BlockscoreError (Generic error, base class)
85+
* AuthenticationError (401 : Invalid API Key)
86+
* ValidationError (400 : Input could not be validated)
87+
* ParameterError (400 : Missing parameter)
88+
* NotFoundError (404 : Attempting to reference nonexistent endpoint)
89+
* InternalServerError (500 : Error on the Blockscore API)
90+
91+
7492
## Contributing to BlockScore
7593

7694
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.

0 commit comments

Comments
 (0)