Skip to content

fix: handle provider required in hosted connect#52

Merged
michiosw merged 2 commits intomainfrom
feat/provider-required-hosted-connect
Apr 10, 2026
Merged

fix: handle provider required in hosted connect#52
michiosw merged 2 commits intomainfrom
feat/provider-required-hosted-connect

Conversation

@michiosw
Copy link
Copy Markdown
Contributor

@michiosw michiosw commented Apr 10, 2026

Summary

  • treat backend provider_required token-exchange errors as a first-run connect condition in the CLI
  • reuse the existing hosted connect fallback instead of silently skipping the credential
  • add a regression test for the backend's current error contract

Why

During full local E2E against spaces, kontext start correctly reached credential resolution for an unattached provider, but the backend returned provider_required and the CLI only recognized older "not connected" string shapes. That caused the CLI to skip hosted connect instead of opening it.

Verification

  • go test ./...
  • go vet ./...
  • go build -o bin/kontext ./cmd/kontext

Follow-up E2E note

With this fix in place, the CLI now reaches the hosted connect browser flow correctly. The remaining local-only blocker is the HTTP stub provider issuer path in spaces, not the CLI fallback logic.


Open with Devin

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@michiosw michiosw merged commit 93bae50 into main Apr 10, 2026
4 checks passed
@michiosw michiosw deleted the feat/provider-required-hosted-connect branch April 10, 2026 11:37
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.

1 participant