Commit 47535f5f authored by Pierre Dittgen's avatar Pierre Dittgen

Affiche un message d'erreur en cas de ressource en ligne non accessible

parent 026d0717
......@@ -357,7 +357,12 @@ def scdl_validator(val_code):
if url_param is None or url_param == '':
flash_error("Vous n'avez pas indiqué d'url à valider")
return redirect(url_for('scdl_validator', val_code=val_code))
return validate(val_code, ValidataSource('url', url_param, url_param))
try:
return validate(val_code, ValidataSource('url', url_param, url_param))
except tabulator.exceptions.HTTPError as e:
flash_error('Erreur : impossible d\'accéder au fichier source en ligne')
log.info(e)
return redirect(url_for('scdl_validator', val_code=val_code))
else: # POST
input_param = request.form.get('input')
......
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