From: Magnus Hagander Date: Mon, 2 Jun 2025 09:34:15 +0000 (+0200) Subject: Don't crash on misspelled http/https in sponsor signup X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=c7dfd89c9ba2910f81f8c371d2842d6227ee8c00;p=pgeu-system.git Don't crash on misspelled http/https in sponsor signup Instead, give a proper error message. --- diff --git a/postgresqleu/util/validators.py b/postgresqleu/util/validators.py index 0cc2026f..0bf11c87 100644 --- 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):