Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/cli/src/lib/dsn/fs-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import * as Sentry from "@sentry/node-core/light";
* - EINVAL: Invalid argument (e.g., scandir on a special/virtual filesystem entry like /proc paths)
* - ELOOP: Too many symbolic links (e.g., cyclic symlink encountered during scan)
* - ETIMEDOUT: Connection timed out (e.g., transient read on a network or cloud-mounted filesystem)
* - ENOTCONN: Transport endpoint is not connected (e.g., a stale or disconnected FUSE/network mount)
* - Unknown system error: Non-POSIX kernel errors on macOS (e.g., errno -11 / EAGAIN on .trace bundles)
* that Node.js cannot map to a standard code string
*
Expand All @@ -42,6 +43,7 @@ function isIgnorableFileError(error: unknown): boolean {
code === "EINVAL" ||
code === "ELOOP" ||
code === "ETIMEDOUT" ||
code === "ENOTCONN" ||
// macOS surfaces non-POSIX kernel errors (e.g. errno -11 on .trace bundles)
// as "Unknown system error -N" without a standard POSIX code string.
code === "UNKNOWN"
Expand Down
11 changes: 11 additions & 0 deletions packages/cli/test/lib/dsn/fs-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ describe("handleFileError", () => {
expect(captureException).not.toHaveBeenCalled();
});

test("ENOTCONN — scandir on a disconnected network or FUSE mount", () => {
handleFileError(
errnoError("ENOTCONN", "ENOTCONN: socket is not connected, scandir"),
{
operation: "scan.walk.readdir",
path: "/mnt/remote",
},
);
expect(captureException).not.toHaveBeenCalled();
});

test("UNKNOWN code — non-POSIX error with UNKNOWN code", () => {
handleFileError(errnoError("UNKNOWN", "Unknown system error -11"), {
operation: "scandir",
Expand Down
Loading