Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-20059]Restart-subscription being invoked without payment method #5631

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cyprain-okeke
Copy link
Contributor

@cyprain-okeke cyprain-okeke commented Apr 9, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-20059

📔 Objective

DataDog is showing POST /organizations/{organizationId}/billing/restart-subscription endpoint failing a decent amount due to a 400 being returned from Stripe.

This 400 is always due to the fact that we’re trying to create a subscription for a customer who does not have a payment method.

Examples:

https://dashboard.stripe.com/customers/cus_GWRlJLsG9XweEM/Can't find link

https://dashboard.stripe.com/customers/cus_L3pEt8uqv9FFbC/Can't find link

https://dashboard.stripe.com/customers/cus_Ps7rhALxguLRmu/Can't find link

https://dashboard.stripe.com/customers/cus_RYxnlN08K8QtgK/Can't find link

https://dashboard.stripe.com/customers/cus_RilMOMmq3YnwnO/Can't find link

📸 Screenshots

After the Fix
https://github.com/user-attachments/assets/0e42d3cb-b8bc-4fbb-a694-4b25c0f3f05e
Before the Fix

Screen.Recording.2025-04-10.at.08.49.54.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@cyprain-okeke cyprain-okeke requested a review from a team as a code owner April 9, 2025 17:40
Copy link

sonarqubecloud bot commented Apr 9, 2025

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 45.73%. Comparing base (d85807e) to head (7766b8e).

Files with missing lines Patch % Lines
...lling/Controllers/OrganizationBillingController.cs 0.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5631   +/-   ##
=======================================
  Coverage   45.73%   45.73%           
=======================================
  Files        1603     1603           
  Lines       72659    72659           
  Branches     6507     6507           
=======================================
  Hits        33229    33229           
  Misses      38018    38018           
  Partials     1412     1412           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Apr 9, 2025

Logo
Checkmarx One – Scan Summary & Detailsf7764a1a-7822-4344-b46d-6441a391a5a9

Great job, no security vulnerabilities found in this Pull Request

@amorask-bitwarden amorask-bitwarden self-requested a review April 9, 2025 18:44
Copy link
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ The result of the video you attached is a 500 error response.

Copy link
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, missed the success video because it didn't render correctly in GitHub. This looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants