Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Validata
validata-ui
Commits
2bf9a556
Commit
2bf9a556
authored
Jun 20, 2019
by
Pierre Dittgen
Committed by
Christophe Benz
Jun 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display nice error on invalid schema URL
parent
c3af7627
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
validata_ui/views.py
validata_ui/views.py
+10
-1
No files found.
validata_ui/views.py
View file @
2bf9a556
...
...
@@ -522,7 +522,16 @@ def custom_validator():
# url of resource to be validated
url_param
=
request
.
args
.
get
(
"url"
)
schema_instance
=
SchemaInstance
.
from_parameters
(
request
.
args
,
schema_catalog_map
)
schema_instance
=
None
try
:
schema_instance
=
SchemaInstance
.
from_parameters
(
request
.
args
,
schema_catalog_map
)
except
json
.
JSONDecodeError
as
e
:
flash_error
(
"Format de schéma non reconnu"
)
return
redirect
(
url_for
(
'home'
))
except
Exception
as
e
:
log
.
exception
(
e
)
flash_error
(
"Erreur lors de l'obtention du schéma"
)
return
redirect
(
url_for
(
'home'
))
if
schema_instance
is
None
:
flash_error
(
"Aucun schéma passé en paramètre"
)
return
redirect
(
url_for
(
'home'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment