diff --git a/tdd/common.py b/tdd/common.py index 9a2c060..c4b6ef5 100644 --- a/tdd/common.py +++ b/tdd/common.py @@ -17,7 +17,7 @@ import subprocess import json import re -from flask import Response +from flask import Response, abort from tdd.sparql import ( @@ -136,5 +136,6 @@ def get_id_description(uri, content_type, ontology): if not resp.text.strip() or not ( re.search(r"^[^\#]", resp.text, re.MULTILINE) ): # because some SPARQL endpoint may send "# Empty file" as response - raise IDNotFound() + #raise IDNotFound() + abort(404) return resp.text diff --git a/tdd/errors.py b/tdd/errors.py index 93aec4b..526e3e6 100644 --- a/tdd/errors.py +++ b/tdd/errors.py @@ -193,7 +193,7 @@ def __init__(self, ld_content): class IDNotFound(AppException): - title = "ID Not Found" + title = "Not found" status_code = 404