Skip to content

[Bug]: Legacy BYOK migration hides daemon validation errors #6279

Description

@open-design-crew

What happened?

After upgrading to a build with secure BYOK profile migration, Open Design automatically posts legacy browser-stored credentials to /api/byok/profiles. When the daemon rejects an invalid legacy value with a structured HTTP 400 response, the web client discards the daemon's safe validation message and shows Local daemon may be offline with Failed to save BYOK credential (400). The daemon did respond, so the guidance is misleading and does not tell the user which legacy field must be corrected.

Steps to reproduce

  1. Start with a pre-migration BYOK configuration stored by an older Open Design build, including an invalid value such as a non-absolute baseUrl.
  2. Launch a build that includes the secure BYOK migration introduced by feat(integrations): add the local Open Design Cloud flow for Codex #6055.
  3. Allow startup migration to POST the legacy credential to /api/byok/profiles.
  4. Observe the daemon return HTTP 400 with a structured VALIDATION_FAILED message.
  5. Observe the toast report that the local daemon may be offline and show only Failed to save BYOK credential (400).

Expected behavior

For daemon HTTP errors, show the safe structured validation reason returned by the daemon so the user can correct the legacy configuration. Reserve the offline message for transport failures where the daemon cannot be reached. Keep the legacy browser credential until migration succeeds.

Open Design version

main after #6055; release/v0.17.0 after #6262 (pre-tag)

Platform

  • macOS (Apple Silicon)

Logs (optional)

The UI reports: `Local daemon may be offline.` and `Failed to save BYOK credential (400)`. The daemon response body contains `VALIDATION_FAILED` with the concrete field validation message.

Screenshots (optional)

None provided.

Additional context

The behavior was introduced by #6055 and is also present on the pre-tag release/v0.17.0 branch through backport #6262. The legacy secret remains in browser storage after the failed migration, which avoids data loss but leaves the user without actionable remediation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions