Skip to content

Handling serde_json::from_slice errors #257

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

Closed
taylor1791 opened this issue Sep 6, 2020 · 2 comments
Closed

Handling serde_json::from_slice errors #257

taylor1791 opened this issue Sep 6, 2020 · 2 comments

Comments

@taylor1791
Copy link

As far as I can tell, there is no way to handle request bodies that Serde fails to deserialize. In my case, I simply want to log it (and till fail the invocation), but another might want to manually put it in a dead letter queue.

  1. Did I overlook something?
  2. If this a desirable feature and you have an API in mind, I am happy to try and implement it.
@rimutaka
Copy link
Contributor

rimutaka commented Sep 6, 2020

@taylor1791 , we have PR #244 that addresses this issue sitting in the queue. It's been there for a while. You can use https://github.com/rimutaka/aws-lambda-rust-runtime/tree/davidbarsky/update-readme branch to get the error logging.
We've been using that branch for some weeks now. I'll be on standby if you run into any problems with it.

@taylor1791
Copy link
Author

taylor1791 commented Sep 7, 2020

I was able to get that branch to serve all of my needs. Thank you for your guidance.

🤞 that the MR will land on master soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants