Commit 6fb0e6a7 authored by Pierre Dittgen's avatar Pierre Dittgen Committed by Christophe Benz

Display catalog schema validation error

parent 79e5d7a9
......@@ -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 = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment