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
4 changes: 3 additions & 1 deletion packages/cli/src/lib/dsn/fs-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as Sentry from "@sentry/node-core/light";
* - ENOTDIR: A path component is not a directory (e.g., `/file.txt/child`)
* - 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)
*
* All other errors are unexpected and should be reported to Sentry.
*
Expand All @@ -35,7 +36,8 @@ function isIgnorableFileError(error: unknown): boolean {
code === "EISDIR" ||
code === "ENOTDIR" ||
code === "EINVAL" ||
code === "ELOOP"
code === "ELOOP" ||
code === "ETIMEDOUT"
);
}
return false;
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/test/lib/dsn/fs-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ describe("handleFileError", () => {
});
expect(captureException).not.toHaveBeenCalled();
});

test("ETIMEDOUT — connection timed out on a network mount", () => {
handleFileError(errnoError("ETIMEDOUT"), {
operation: "scandir",
path: "/mnt/cloud-storage",
});
expect(captureException).not.toHaveBeenCalled();
});
});

describe("unexpected errors (SHOULD report to Sentry)", () => {
Expand Down
Loading