projects
/
pgeu-system.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9134069
)
Don't crash on misspelled http/https in sponsor signup
author
Magnus Hagander
<magnus@hagander.net>
Mon, 2 Jun 2025 09:34:15 +0000
(11:34 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Mon, 2 Jun 2025 09:34:15 +0000
(11:34 +0200)
Instead, give a proper error message.
postgresqleu/util/validators.py
patch
|
blob
|
blame
|
history
diff --git
a/postgresqleu/util/validators.py
b/postgresqleu/util/validators.py
index 0cc2026fc5c80bc1fb301b022d0fad8d3fd8e2d2..0bf11c875ae60ea24acfc2b4b5b0eb0a43b139f1 100644
(file)
--- a/
postgresqleu/util/validators.py
+++ b/
postgresqleu/util/validators.py
@@
-54,6
+54,8
@@
def Http200Validator(value):
raise ValidationError("Connection to server failed")
except requests.exceptions.ReadTimeout:
raise ValidationError("URL timed out")
+ except requests.exceptions.InvalidSchema:
+ raise ValidationError("Invalid schema in URL, please use http or https")
def TwitterValidator(value):