weixin_39603995
weixin_39603995
2020-12-08 19:06

Stripe test token fails when usage limit exceeded


(Status 503) Test mode requests are temporarily disabled due to exceptionally high traffic. Please contact us via https://support.stripe.com/contact for more information if this problem persists.
Failure/Error:  ||= Stripe::Token.create(card: stripe_card(:visa))

Stripe::APIError:
  Test mode requests are temporarily disabled due to exceptionally high traffic. Please contact us via https://support.stripe.com/contact for more information if this problem persists.
./spec/support/stripe_helpers.rb:24:in `stripe_token_approved'
./spec/controllers/payments_controller_spec.rb:70:in `block (5 levels) in <top>'
./spec/controllers/payments_controller_spec.rb:69:in `block (4 levels) in <top>'
------------------
--- Caused by: ---
Faraday::ClientError:
  the server responded with status 503
  ./spec/support/stripe_helpers.rb:24:in `stripe_token_approved'
</top></top>

该提问来源于开源项目:bikeindex/bike_index

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39897449 weixin_39897449 5月前

    This was happening earlier today, e.g. Pr #1011 (this job on CircleCI). I just merged and manually deployed

    点赞 评论 复制链接分享
  • weixin_39603995 weixin_39603995 5月前

    Are we testing against the Stripe API in automated tests intentionally? If not it might make sense to stub out or VCR those calls.

    点赞 评论 复制链接分享
  • weixin_39897449 weixin_39897449 5月前

    We are, because I felt like having actual requests go through for money was good. Case in point, this situation!

    I could be convinced with some cassettes with short expirations, or a good argument

    点赞 评论 复制链接分享
  • weixin_39603995 weixin_39603995 5月前

    We are

    Cool — just wanted to flag the test failure in case it wasn't intentional. I don't see this becoming a recurring issue unless the number of developers working on the project increases, so I'll close for now. Cassettes with short expirations would probably be the most expedient approach.

    点赞 评论 复制链接分享

相关推荐