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

[Bug] empty currentBillingSubscription when calling verify #5166

Closed
martmull opened this issue Apr 25, 2024 · 1 comment · Fixed by #5283
Closed

[Bug] empty currentBillingSubscription when calling verify #5166

martmull opened this issue Apr 25, 2024 · 1 comment · Fixed by #5283
Assignees
Labels
type: bug Something isn't working

Comments

@martmull
Copy link
Contributor

martmull commented Apr 25, 2024

Image

How to?
Image

@martmull martmull self-assigned this Apr 25, 2024
@martmull martmull linked a pull request May 3, 2024 that will close this issue
@martmull martmull added the type: bug Something isn't working label May 3, 2024
Copy link

greptile-apps bot commented May 3, 2024

To resolve the issue of an empty currentBillingSubscription when calling verify, follow these steps:

  1. Verify Billing Service Fetch Method: Ensure that getCurrentBillingSubscription in /packages/twenty-server/src/engine/modules/billing/billing.service.ts correctly queries for the current billing subscription based on the workspace ID and that it handles cases where a subscription might not exist.

  2. Check Workspace Resolver: In /packages/twenty-server/src/core/workspace/workspace.resolver.ts, confirm that the resolver method which calls getCurrentBillingSubscription correctly passes the workspace ID and handles the response, especially null or undefined subscription cases.

  3. Frontend Data Handling: In /packages/twenty-front/src/pages/settings/SettingsBilling.tsx, ensure that the component correctly handles and displays the state when currentBillingSubscription data is null or empty. This might involve adding conditional rendering logic to display a message or a default state when no subscription data is available.

  4. Debugging and Logging: Add logging at critical points within the billing service and workspace resolver to trace the flow of data and identify where the breakdown occurs. This can help pinpoint if the issue is with data retrieval, data passing, or frontend display.

These steps target the specific components involved in the issue based on the provided codebase structure. Adjustments may be needed based on additional findings during the debugging process.

References

twentyhq/twenty/packages/twenty-server/src/core/workspace/workspace.resolver.ts
twentyhq/twenty/packages/twenty-server/src/engine/modules/billing/billing.service.ts
twentyhq/twenty/packages/twenty-front/src/pages/settings/SettingsBilling.tsx

Ask Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants
@martmull and others