Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on json decode #23

Open
bl3tt3r opened this issue Oct 17, 2023 · 1 comment
Open

Error on json decode #23

bl3tt3r opened this issue Oct 17, 2023 · 1 comment
Labels

Comments

@bl3tt3r
Copy link

bl3tt3r commented Oct 17, 2023

Hello,
Firstly, thank you for this project.

We used your pack today and we're stuck with an error :

19602c8e-9e7d-4504-a287-b33ceb20d253

The content we send via rabbit for our tests :

6ad296b1-2e6f-44e3-a8b2-bf9c3f1acca5

Unless I'm mistaken, if the _deserialize_body function works and returns a dict, then the decode() function crashes in all cases.

Shouldn't the decode function be set before the _deserialize_body ?

@arm4b
Copy link
Member

arm4b commented Oct 19, 2023

Could the .decode() be there in case when pickle is used?

DESERIALIZATION_FUNCTIONS = {"json": json.loads, "pickle": pickle.loads}

I think it's worth enclosing .decode() in some try/catch, unless you see a better way.
Please open a PR to fix your issue anyway.

@arm4b arm4b added the bug label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants