utils/converters: use ValidationError instead of Exception
This ensures that after validation the page is resolved as a 404 instead of displaying a 500.
This commit is contained in:
parent
6cbf5a51f9
commit
daadd21877
|
@ -63,7 +63,7 @@ class PageConverter(BaseConverter):
|
|||
|
||||
t = self.object.query.filter_by(id=tid).first()
|
||||
if t is None:
|
||||
raise Exception(f"BaseConverter: no object with id {url}")
|
||||
raise ValidationError(f"BaseConverter: no object with id {url}")
|
||||
|
||||
return (t, page)
|
||||
|
||||
|
|
Loading…
Reference in New Issue