home · contact · privacy
2e479d9cb144f8e25aafccdc09a75e20d75de6f3
[plomtask] / plomtask / exceptions.py
1 """
2 Whatever fits nowhere else, and/or is too small/trivial
3 to merit its own module at this point.
4 """
5
6
7 class HandledException(Exception):
8     """To identify Exceptions based on expected (if faulty) user behavior."""
9     http_code = 500
10
11
12 class BadFormatException(HandledException):
13     """To identify Exceptions on malformed inputs."""
14     http_code = 400
15
16
17 class NotFoundException(HandledException):
18     """To identify Exceptions on unsuccessful queries."""
19     http_code = 404