Commit c98646d
authored
fix(dsn): ignore EINVAL from readdirSync on special files (#1286)
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](https://sentry.sentry.io/issues/7627608153/?seerDrawer=true)
<sub>Comment `@sentry <feedback>` on this PR to have Autofix iterate on
the changes.</sub>
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>1 parent 907799d commit c98646d
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
0 commit comments