You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an issue in my test suite where Stripe.WebhookHandler handle_event receives an object that isn't a struct. I tracked this down in the code to the check known_struct?/1
I believe the issue here is that in some envs (not sure how prod vs dev vs test works here), the build modules aren't preloaded. So if you check function_exported? before the module is loaded, it will always return false.
I may be wrong here, so I didn't PR a fix yet. My fix for now will be to manually ensure the necessary stripe files are loaded using Code.ensure_loaded!
The text was updated successfully, but these errors were encountered:
I ran into an issue in my test suite where Stripe.WebhookHandler
handle_event
receives an object that isn't a struct. I tracked this down in the code to the checkknown_struct?/1
I believe the issue here is that in some envs (not sure how prod vs dev vs test works here), the build modules aren't preloaded. So if you check function_exported? before the module is loaded, it will always return false.
https://github.com/sb8244/stripity-stripe/blame/main/lib/stripe/converter.ex#L118
I may be wrong here, so I didn't PR a fix yet. My fix for now will be to manually ensure the necessary stripe files are loaded using
Code.ensure_loaded!
The text was updated successfully, but these errors were encountered: