home · contact · privacy
Add Conditions for Todos/Processes to be met or undone by other Todos.
[plomtask] / plomtask / exceptions.py
1 """Exceptions triggering different HTTP codes."""
2
3
4 class HandledException(Exception):
5     """To identify Exceptions based on expected (if faulty) user behavior."""
6     http_code = 500
7
8
9 class BadFormatException(HandledException):
10     """To identify Exceptions on malformed inputs."""
11     http_code = 400
12
13
14 class NotFoundException(HandledException):
15     """To identify Exceptions on unsuccessful queries."""
16     http_code = 404