Commit f224bba5 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Handle non-table errors (e.g. task-error)

parent 78defca3
......@@ -365,7 +365,17 @@ def validate(schema_instance: SchemaInstance, validata_resource: ValidataResourc
badge_stats = validata_core.compute_badge_metrics(
validata_core_report, badge_config
badge_url, badge_msg = get_badge_url_and_message(badge_stats)
if badge_stats:
badge_url, badge_msg = get_badge_url_and_message(badge_stats)
# Non table errors
if validata_core_report["errors"]:
non_table_error = validata_core_report["errors"][0]
msg = non_table_error["note"]
flash_error(f"Une erreur est survenue empêchant la validation : {msg}")
return redirect(
# Source error
source_errors = [
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