Skip to content

pLimit concurrency helper silently drops errors from rejected tasks #18

@CodeDeficient

Description

@CodeDeficient

The hand-rolled pLimit helper in analyzePackageVersions catches task errors implicitly — if a promise rejects before being assigned to results[i], the slot stays undefined and the error disappears. The consumer checks if (!ageInfoResult) continue so it doesn't crash, but we lose visibility into what actually failed.

Right now every task produces a resolved promise (even the failure case returns null), so this isn't biting us in practice. But if anyone adds a task that can genuinely reject, the error would be swallowed with no logging.

The fix would be to either:

  • Wrap each task call in a try/catch that logs the error before returning null
  • Or use Promise.allSettled and check for rejected promises in the results

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions