Skip to content

bug(desktop): generation timeout abort surfaces as raw 'Request was aborted.' losing reason #164

@hqhq1025

Description

@hqhq1025

Summary

User reports of `CodesignError: Request was aborted.` during long generations (e.g. one-shot full PDP / multi-section pages). The error is opaque — users have no idea this is a local timeout fire, not a network/model failure.

Root Cause

Two compounding issues:

1. Abort reason is dropped before reaching the user

`apps/desktop/src/main/generation-ipc.ts:76-78` correctly aborts with a descriptive reason:

```ts
controller.abort(
new Error(`Generation aborted after ${timeoutSec}s (Settings → Advanced → Generation timeout).`)
);
```

But the underlying SDK (Anthropic / OpenAI) wraps the abort and throws its own generic message — `node_modules/@anthropic-ai/sdk/.../error.ts:112`:

```ts
super(undefined, undefined, message || 'Request was aborted.', undefined);
```

The original `controller.signal.reason` is never read by the catch block in main, so the user sees `Request was aborted.` with no context.

2. Settings → Advanced → Generation timeout dropdown is broken

(Tracked internally; surfacing here.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions