Skip to content

Conversation

@calavera
Copy link
Contributor

@calavera calavera commented Apr 14, 2023

Use serde_path_to_error to provide a little bit more information about the serde failure.

Issue #, if available:

Fixes #639

Description of changes:

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

@calavera calavera force-pushed the better_serde_errors branch from dd42a92 to 8463eaa Compare April 14, 2023 01:00
Use serde_path_to_error to provide a little bit more information about the serde failure.

Signed-off-by: David Calavera <david.calavera@gmail.com>
@calavera calavera force-pushed the better_serde_errors branch from 8463eaa to 96329c3 Compare April 14, 2023 01:14
…t element "."

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
@calavera calavera requested a review from bnusunny April 14, 2023 02:13

use crate::{Context, LambdaEvent};

const ERROR_CONTEXT: &str = "failed to deserialize the incoming data into the function payload's type";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np: function's payload type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Signed-off-by: David Calavera <david.calavera@gmail.com>
@calavera calavera merged commit 2360a05 into main Apr 14, 2023
@calavera calavera deleted the better_serde_errors branch April 14, 2023 15:20
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

Successfully merging this pull request may close these issues.

Explain Serde deserialization issues clearly in error messages

3 participants