Closed vincent-thomas closed 5 months ago
When constructing the webhook event it something happens with the body so every event fails.
This code
let payload_str = std::str::from_utf8(&payload).unwrap(); let stripe_signature = get_header(&req, "Stripe-Signature").unwrap_or_default(); let stripe_secret_key = c.config.get_stripe_webhook_secret().await; let event = match Webhook::construct_event(payload_str, stripe_signature, &stripe_secret_key) { Ok(event) => event, Err(e) => { eprintln!("Error constructing event: {:?} {:?}", e, payload_str); return Ok(()); } };
Every single event it goes to the Err and prints error
Error constructing event: BadParse(Error("unknown variant `self`, expected `account` or `self_`", line: 133, column: 3))
It parses the event like it should
No response
Not relevant
1.77.0-nightly - but not relevant
0.31.0
2023-10-16
I believe this is related to https://github.com/arlyon/async-stripe/pull/490, so should get fixed once that gets merged.
Describe the bug
When constructing the webhook event it something happens with the body so every event fails.
To Reproduce
This code
Every single event it goes to the Err and prints error
Expected behavior
It parses the event like it should
Code snippets
No response
OS
Not relevant
Rust version
1.77.0-nightly - but not relevant
Library version
0.31.0
API version
2023-10-16
Additional context
No response