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