Skip to content

Commit 6ac884d

Browse files
committed
Added warnings on parsing errors.
1 parent 8e14595 commit 6ac884d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

taskiq/receiver/params_parser.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ def parse_params(
7676
# trying to parse found value as in type annotation.
7777
message.args[argnum] = parse_obj_as(annot, value)
7878
except (ValueError, RuntimeError) as exc:
79-
logger.debug(exc, exc_info=True)
79+
logger.warning(
80+
"Can't parse argument %d for task %s. Reason: %s",
81+
argnum,
82+
message.task_name,
83+
exc,
84+
exc_info=True,
85+
)
8086
else:
8187
# We try to get this parameter from kwargs.
8288
value = message.kwargs.get(param_name)
@@ -86,4 +92,10 @@ def parse_params(
8692
# trying to parse found value as in type annotation.
8793
message.kwargs[param_name] = parse_obj_as(annot, value)
8894
except (ValueError, RuntimeError) as exc:
89-
logger.debug(exc, exc_info=True)
95+
logger.warning(
96+
"Can't parse argument %s for task %s. Reason: %s",
97+
param_name,
98+
message.task_name,
99+
exc,
100+
exc_info=True,
101+
)

0 commit comments

Comments
 (0)