Commit 86b07244 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Explicit error message when tabular data url can't be retrieved (404)

parent 858e744b
......@@ -685,12 +685,18 @@ def custom_validator():
# Process URL
else:
validation_form_url = compute_validation_form_url(
schema_instance.request_parameters()
)
if not url_param:
flash_error("Vous n'avez pas indiqué d'URL à valider")
return redirect(
compute_validation_form_url(schema_instance.request_parameters())
)
return validate(schema_instance, URLValidataResource(url_param))
return redirect(validation_form_url)
try:
return validate(schema_instance, URLValidataResource(url_param))
except frictionless.FrictionlessException as ex:
flash_error(ex.error.message)
return redirect(validation_form_url)
elif request.method == "POST":
......
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