-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
benefit: lowCode hygiene, minor polish, future-proofingCode hygiene, minor polish, future-proofingeffort: medium1-4 hours, multiple files or moderate complexity1-4 hours, multiple files or moderate complexitypriority: lowMinor impact, few users, non‑urgentMinor impact, few users, non‑urgenttype: refactorCode cleanup or restructuring without changing external behaviorCode cleanup or restructuring without changing external behavior
Description
Problem
The `Logger` interface (`logger.ts:44`) includes a `throw()` method in the public API:
throw(message: InputLogObject | string, ...args: unknown[]): never;This mixes logging concerns with error-throwing control flow. Task authors who receive a `Logger` via `RunnerContext` may be confused by a logger that throws errors.
Impact
- Unconventional API — most logging libraries don't include error-throwing
- Muddles the responsibility boundary between logging and error handling
- May surprise users writing custom tasks
Suggested Approach
Consider separating the error-throwing capability from the Logger interface, or at minimum documenting the intended usage clearly in the public API docs.
Found during architectural review.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
benefit: lowCode hygiene, minor polish, future-proofingCode hygiene, minor polish, future-proofingeffort: medium1-4 hours, multiple files or moderate complexity1-4 hours, multiple files or moderate complexitypriority: lowMinor impact, few users, non‑urgentMinor impact, few users, non‑urgenttype: refactorCode cleanup or restructuring without changing external behaviorCode cleanup or restructuring without changing external behavior