diff --git a/validata_ui/views.py b/validata_ui/views.py index 94d89208dbaf0cec1105b7e68acec9c46d4ca7f8..245ae6ba36337cb771869b6ceed1d786696db227 100644 --- a/validata_ui/views.py +++ b/validata_ui/views.py @@ -13,6 +13,7 @@ from operator import itemgetter from pathlib import Path from urllib.parse import urlencode, urljoin +import jsonschema import requests import tableschema import tabulator @@ -453,6 +454,8 @@ def home(): err_msg = "problème de connexion" elif isinstance(exc, json.decoder.JSONDecodeError): err_msg = "format JSON incorrect" + elif isinstance(exc, jsonschema.exceptions.ValidationError): + err_msg = "le catalogue ne respecte pas le schéma de référence" home_section['err'] = err_msg else: home_section_catalog = []