Skip to content

Commit 73dcf8c

Browse files
committed
Add extra diagnostics
1 parent cbad0e0 commit 73dcf8c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/workflows/transport/pika_transport.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,15 @@ def _call_message_callback(
330330
body: bytes,
331331
):
332332
"""Rewrite and redirect a pika callback to the subscription function"""
333-
merged_headers = dict(properties.headers)
333+
if properties.headers is None:
334+
logger.warning(
335+
f"""Got unexpected empty header; this could be an error?
336+
{_channel=}
337+
{method=}
338+
{properties=}
339+
{body=}"""
340+
)
341+
merged_headers = dict(properties.headers or {})
334342
merged_headers.update(
335343
{
336344
"consumer_tag": str(method.consumer_tag),

0 commit comments

Comments
 (0)