summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slixmpp/jid.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/slixmpp/jid.py b/slixmpp/jid.py
index adde95a4..d02f98a3 100644
--- a/slixmpp/jid.py
+++ b/slixmpp/jid.py
@@ -133,15 +133,15 @@ def _validate_domain(domain: str):
try:
domain = idna(domain)
except StringprepError:
- raise InvalidJID('idna validation failed')
+ raise InvalidJID(f'idna validation failed: {domain}')
if ':' in domain:
- raise InvalidJID('Domain containing a port')
+ raise InvalidJID(f'Domain containing a port: {domain}')
for label in domain.split('.'):
if not label:
- raise InvalidJID('Domain containing too many dots')
+ raise InvalidJID(f'Domain containing too many dots: {domain}')
if '-' in (label[0], label[-1]):
- raise InvalidJID('Domain started or ended with -')
+ raise InvalidJID(f'Domain starting or ending with -: {domain}')
if not domain:
raise InvalidJID('Domain must not be 0 bytes')