Skip to content

Raw exception messages leak into German UI text and across the sync wire #602

Closed

Description

@DeepDiver1975

Split out of the UX review #262.

Problem

Many user-facing error strings append the raw exception message to German text, and some show only the exception message. That text is often English, technical, or both (socket errors, HttpRequestException, BCL argument messages). An ELW crew reads "Verbindung zu 192.168.1.20 nicht möglich … (No route to host)". Worse, this text crosses the sync trust boundary: the host sends internal exception text to peers.

Sites found on main @ 1ed810d:

  • Sync host → peers: IncidentHost.cs:325 returns Results.BadRequest(ex.Message). RemoteIncidentSession.cs:708 relays it, and the client shows "Änderung nicht übernommen: {reason}" (IncidentWorkspaceViewModel.cs:148).
  • Join: HomeViewModel.cs:551 (the default case, the main offender), and :450 (inner exception folded into the master-data error, shown at :545).
  • Home, other: HomeViewModel.cs:200, :300, :354, :594.
  • Workspace:
    • IncidentWorkspaceViewModel.cs:749, the persistence banner "Speichern fehlgeschlagen: {ex.Message} …";
    • :1346 export;
    • :1382 e-mail;
    • :1470 share. ShareStatus is also truncated to 320 px with the rest only in a tooltip.
  • Dateien: FilesViewModel.cs:181, :283 and :322 set ErrorMessage = ex.Message with no German framing at all; :234 collects per-file reasons the same way.
  • Stammdaten: MasterDataEditorViewModel.cs:426, :461.
  • Launchers: UrlLauncher.cs:50, ContactLauncher.cs:44, :69. These surface in Links, Kontakte and Über.

Expected

  • Every user-visible failure is a German sentence that says what failed and what to do. The exception type picks the sentence, never its message.
  • Typed exceptions that already carry German text (e.g. CertificateChangedException) may keep using it. Make that an explicit allowlist, not a fallthrough.
  • The host answers a rejected command with a fixed, non-revealing reason, or a small closed set of reason codes the client maps to German. It never sends ex.Message.
  • AGENTS.md: "Personal data stays out of diagnostics". An exception message can carry a file path or a name, which is another reason not to echo it.

Notes

Activity

  1. added
    bugSomething isn't working
    uxUser interface and usability
    securitySecurity-relevant defect or hardening work
    on Oct 16, 2026
  2. DeepDiver1975 commented on Oct 17, 2026

    @DeepDiver1975
    ContributorAuthor

    Rescoping before implementation.

    The sync part is not a leak. The domain guards throw German sentences on purpose (RoleAssignment, EtbEntry, ForceUnit, …). The ex.Message the host returns at IncidentHost.cs:325 is therefore mostly the same German sentence the local UI shows for the same mistake. The peer receiving it has already passed the PIN and sees the whole incident. The one real wart is KeyNotFoundException, whose text can be English BCL wording.

    A blanket "the exception type picks the sentence" rewrite would cost something. With no log file (see #300), ex.Message is the only diagnostic the app has. "Access to the path … is denied" or "No space left on device" is what tells someone what to fix. Replacing it everywhere with a generic sentence makes field problems harder to diagnose.

    What this issue will do:

    • Sites that show only ex.Message, with no German framing, get a German sentence saying what failed, with the detail kept after it: FilesViewModel (ErrorMessage = ex.Message) and the join errors in HomeViewModel.
    • The host maps KeyNotFoundException to a fixed German reason instead of the BCL text, with a test replaying a command against an unknown id.

    Dropped: the allowlist machinery and the rewrite of sites that already carry German framing.

    🤖 Generated with Claude Code

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

    bugSomething isn't workingsecuritySecurity-relevant defect or hardening workuxUser interface and usability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions