Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

fix(dsn): ignore EINVAL from readdirSync on special files - #1286

Merged
BYK merged 1 commit into
mainfrom
seer/fix/dsn-ignore-einval
Jul 24, 2026
Merged

BYK merged 1 commit into
mainfrom
seer/fix/dsn-ignore-einval

Conversation

@sentry

@sentry sentry Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

When the DSN code scanner walks directories, readdirSync can encounter special filesystem entries (e.g., /proc paths on Linux). For these entries, readdirSync (via scandir) can throw an EINVAL error.

Previously, EINVAL was not included in the list of ignorable filesystem errors in src/lib/dsn/fs-utils.ts::isIgnorableFileError. This led to these benign and expected errors being captured as Sentry issues (CLI-2AW).

This change adds EINVAL to the set of ignorable errors in isIgnorableFileError and updates the corresponding JSDoc comment. This suppresses the spurious Sentry reports without altering the directory walker's behavior, as it already correctly handles these cases by returning an empty list of entries.

Fixes CLI-2AW

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@github-actions

github-actions Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-24 22:34 UTC

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 5491 uncovered lines.
❌ Project coverage is 81.72%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    81.73%    81.72%    -0.01%
==========================================
  Files          427       427         —
  Lines        30036     30036         —
  Branches     19526     19527        +1
==========================================
+ Hits         24547     24545        -2
- Misses        5489      5491        +2
- Partials      2048      2048         —

Generated by Codecov Action

@BYK
BYK merged commit c98646d into main Jul 24, 2026
32 checks passed
@BYK
BYK deleted the seer/fix/dsn-ignore-einval branch July 24, 2026 22:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant