Skip to content

ERRO Request error error_message="closed stream" method=get path=/v1/payment_methods #193

@AlanMcCann

Description

@AlanMcCann

Versions
stripe-rails: 1.10.1
stripe: 5.22.0
ruby 2.6.3

After starting the rails app, I can issue successful requests one after another. If I pause for a minute and then try again, I get a message as follows

irb(main):028:0> Stripe::PaymentMethod.list({customer: "cus_xxxxxxxxxxxxxxxx", type: "card"})
INFO Request to Stripe API api_version=2019-12-03 method=get num_retries=0 path=/v1/payment_methods
ERRO Request error elapsed=0.03208500000619097 error_message="closed stream" method=get path=/v1/payment_methods

This happens with any method

This doesn't happen with the plain stripe gem.

I have tried creating a new client for each request and that has the same issue

client = Stripe::StripeClient.new
payment_methods, resp = client.request do
  Stripe::PaymentMethod.list({
    customer: "cus_xxxxxxxxxxxx",
    type: 'card',
    limit: 100
  }, $STRIPE_REQUEST_CREDENTIALS[:non_profit])
end

Any thoughts? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions