Skip to content

Commit fb0efe3

Browse files
committed
Include more context when registration fails
1 parent 6063535 commit fb0efe3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

postgres_composite_types/composite_type.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,13 @@ def database_connected(cls, signal, sender, connection, **kwargs):
142142
# will run soon.
143143
try:
144144
cls.register_composite(connection)
145-
except ProgrammingError:
145+
except ProgrammingError as exc:
146146
LOGGER.warning(
147-
"Failed to register composite %s. "
148-
"The migration to register it may not have run yet.",
147+
"Failed to register composite %r. "
148+
"The migration to register it may not have run yet. "
149+
"Error details: %s",
149150
cls.__name__,
151+
exc,
150152
)
151153

152154
# Disconnect the signal now - only need to register types on the

0 commit comments

Comments
 (0)