Skip to content

Commit

Permalink
Checking also for ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
TonnoBelloSnello committed Sep 8, 2024
1 parent a689fb1 commit 05a4862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion microrabbit/app/rabbit_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def _handler(self, exchange: Exchange, function: Callable[..., Awaitable],
body = message.body.decode()
try:
data = ast.literal_eval(body)
except SyntaxError:
except (SyntaxError, ValueError):
data = body

_logger.debug(f"Received message {data} from {message.routing_key}")
Expand Down

0 comments on commit 05a4862

Please sign in to comment.