Skip to content

Desktop: subscription endpoints hit Rust backend (404) instead of Python backend #6065

@mdmohsin7

Description

@mdmohsin7

Bug

Desktop app users see "Failed to load plan information" when navigating to the Plan & Usage section in Settings.

Root Cause

The desktop app sends all API calls to the Rust desktop backend (OMI_API_URL, which resolves to desktop-backend-hhibjajaja-uc.a.run.app in production). However, the subscription and payment endpoints only exist on the Python backend (api.omi.me):

  • GET /v1/users/me/subscription404 on Rust backend
  • POST /v1/payments/checkout-session404 on Rust backend
  • POST /v1/payments/customer-portal404 on Rust backend

Sentry Evidence

GET: https://desktop-backend-hhibjajaja-uc.a.run.app/v1/users/me/subscription [404]
→ "Failed to load subscription: HTTP error: 404"

Other endpoints on the same Rust backend work fine (goals, transcription-preferences, etc. all return 200).

Verified

  • curl https://api.omi.me/v1/users/me/subscription with valid auth → returns correct subscription JSON
  • curl https://desktop-backend-hhibjajaja-uc.a.run.app/v1/users/me/subscription404
  • curl https://desktop-api.omi.me/v1/users/me/subscription404

Affected Code

  • Desktop client: APIClient.swiftgetUserSubscription(), createCheckoutSession(), createCustomerPortalSession() all use baseURL (Rust backend)
  • Error shown: SettingsPage.swift:5330 — catches any error and shows "Failed to load plan information."

Fix Options

  1. Route subscription/payment calls to the Python backend — Add a mainBackendURL property to APIClient (defaulting to https://api.omi.me/, overridable via OMI_MAIN_BACKEND_URL env var) and use the customBaseURL parameter for these three calls
  2. Add a proxy in the Rust backend — Forward /v1/users/me/subscription and /v1/payments/* to the Python backend
  3. Add the subscription endpoint to the Rust backend — Implement it directly in Rust (most work)

Option 1 is the simplest and most targeted fix.

cc @kodjima33

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdesktopp1Priority: Critical (score 22-29)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions