Use werkzeug's built-in exceptions