diff --git a/presentation_validator/web.py b/presentation_validator/web.py index 1750068..079a164 100644 --- a/presentation_validator/web.py +++ b/presentation_validator/web.py @@ -68,9 +68,16 @@ def post_response(): # If still not present → None if not version: - version = None + version = None - result = check_manifest(data, version) + try: + result = check_manifest(data, version) + except Exception as error: + traceback.print_exc() + return { + 'okay': 0, + 'error': f'Validation failed. Got "{error}"', + } response.content_type = 'application/json' return result.json() diff --git a/views/index.html b/views/index.html index 2f86fd0..62a53df 100644 --- a/views/index.html +++ b/views/index.html @@ -18,11 +18,37 @@ @@ -57,26 +83,54 @@ recommendations that haven't been followed. -
-
- - URL of Manifest to Validate:
-
- - Select Presentation API Version: - -
- -
- - -
+
+ Validate by URLValidate by Direct Input +
+ +
+ +
+
+ + URL of Manifest to Validate:
+
+ + Select Presentation API Version: + +
+ +
+ + +
+
+ +
+
+ + Paste the Manifest to Validate:
+
+ + Select Presentation API Version: + +

+ + +
+
+