Skip to content

Commit 5d06b25

Browse files
log an error if the recipe wrapper recieves a message that is not a recipe (#163)
1 parent bf5c890 commit 5d06b25

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/workflows/recipe/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import functools
4+
import logging
45
from collections.abc import Callable
56
from typing import Any
67

@@ -16,6 +17,8 @@
1617
"wrap_subscribe_broadcast",
1718
]
1819

20+
logger = logging.getLogger("workflows.recipe")
21+
1922

2023
def _wrap_subscription(
2124
transport_layer,
@@ -76,6 +79,10 @@ def unwrap_recipe(header, message):
7679
# "First 1000 characters of header:\n%s\n" + \
7780
# "First 1000 characters of message:\n%s",
7881
# str(header)[:1000], str(message)[:1000])
82+
logger.error(
83+
"The input to this service is not a wrapped recipe. "
84+
"Unable to process incoming message."
85+
)
7986
transport_layer.nack(header)
8087

8188
if mangle_for_receiving:

0 commit comments

Comments
 (0)