Error body serialization fails for insufficient_capabilities_for_transfer
#636
Labels
bug
Something isn't working
insufficient_capabilities_for_transfer
#636
Describe the bug
My integration made a request to
POST /v1/transfers
and get back this response:This causes the async-stripe library to return a
StripeError::JSONSerialization
instead ofStripeError::Stripe
.To Reproduce
transfers
capability. I think not doing the onboarding for the connected account will also not give it any capabilities.Expected behavior
It should parse the error correctly and return the right type of error. Preferably, I think the
ErrorCode
enum should have anUnknown(String)
variant so that cases like this can be worked around by users without an crate update.Code snippets
No response
OS
linux, ubuntu 20.04
Rust version
1.82
Library version
async-stripe 0.39.1
API version
2023-10-16
Additional context
Directly related to: #384
I'm willing to contribute a fix for this.
The text was updated successfully, but these errors were encountered: