Skip to content

bug(platform): AI provider settings show English server text and a wrong "no provider files" diagnosis when reads fail #4831

Closed

Description

@yannickmonney

Problem

Settings › AI providers, which shares its credential components with Settings › Connectors, reports failures in raw or English text and turns failed reads into empty states. Paths are under services/platform/app/features/settings/ at main acd5dbd10.

# Where Code What the user sees
1 Every credential and catalog error on the page credentials/map-credential-error.ts:34-46 returns the server's data.message verbatim, otherwise err.message. Its fallback is the literal English 'Something went wrong. Reload and try again.' (:32). It feeds the list alerts (providers/components/providers-settings.tsx:137, :146), the refresh alert (:102) and every dialog through provider-definition-form.ts:145. English server sentences in every locale. For example, de shows "Konnte die Zugangsdaten nicht laden: Failed to fetch" for a lost connection. A refused rename says, in English, "A credential named "X" already exists for this provider — pick a different name." The app's own failureDetail path has a localized sentence for the same network failure (common.connectionLost: "Couldn't reach Tale. Check your connection and try again.")
2 Add credential after a failed catalog read providers-settings.tsx:84: (catalogsQuery.data ?? []).map(…). The vendor picker then has nothing addable and shows catalogEmpty (credentials/vendor-picker-pane.tsx:128-129): "This deployment ships no provider files. Check that the config root is mounted and readable." A wrong diagnosis. It sends an admin to check a mounted config root when the read simply failed, and offers no retry
3 The credential list after a failed read credentials/credential-table.tsx:344: dataSource: { type: 'query', data: isLoading ? undefined : rows }, with no error or retry. providers-settings.tsx:184 passes credentialsQuery.data ?? [] The destructive "Could not load the credentials: …" alert and, under it, the empty state that invites connecting a first provider. There is no Try again

Tests: map-credential-error.test.ts pins the verbatim pass-through. providers-settings.test.tsx:928 checks only the page alert for a failed catalog read (with an English server message). Nothing covers the Add credential picker after that failure, or a failed credential-list read under the table.

Expected

  • Map credential error codes to catalog strings, and use failureDetail for transport and server faults. The design note in map-credential-error.ts:1-18 assumes the server's English sentence is fit to show; for de and fr it isn't (the same class as i18n(platform): automation refusals (65 server sentences) and cron errors reach German and French authors in English #4524).
  • On a failed catalog read, say the provider list couldn't be loaded, with Try again, instead of catalogEmpty.
  • Pass error and retry to the credential table's useListPage source, so a failed read shows one error with Try again and no empty state.
  • Regression: component tests:
    • a failed catalog read must not show catalogEmpty;
    • a failed list read shows Try again and no empty state;
    • a 500 and a network failure show localized text (de) without the server sentence.

Severity and owner

Activity

  1. yannickmonney commented on Oct 12, 2026

    @yannickmonney
    ContributorAuthor

    Addendum (Review A, TALE-358, 2026-10-13 00:15 Zurich occurrence): two more catalog messages. main df7cd70f7, paths under services/platform/app/features/settings/providers/ unless noted.

    1. A failed "Refresh catalogs" is reported twice.

    • hooks/mutations.ts:65-76: useRefreshProviderCatalogs keeps useBackendAction's default error toast. The hook's neighbours all pass errorToast: false (:27-45, :85-94).
    • components/providers-settings.tsx:93-106: the page also catches the failure and shows its own inline providers.catalogs.refreshFailed message, with the mapped credential error.
    • Effect: one failed refresh produces a generic error toast and the inline message, which name the failure differently.
    • Expected: errorToast: false on the refresh hook, so the inline message, which names the cause, is the only report.

    2. A catalog failure is shown as the raw exception text.

    • The providers route stores catalogError = error instanceof Error ? error.message : String(error) (backend/domains/providers/routes.ts:244).
    • Every row that depends on the catalog shows it inside providers.card.catalogUnavailable (credential-adapter.tsx:520-524). A German admin reads "Modellkatalog nicht verfügbar: catalog fetch returned HTTP 401".
    • Expected: return a code, such as unauthorized, unreachable or invalid response, and word it in the catalog. Keep the raw text for the logs.

    This is static reading, verified at the cited lines. I didn't run it.

  2. added
    agent-ready
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions