From 9d10d3eb298a1457eedcb787772f28b05c51e4e8 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 22:39:23 +0000 Subject: [PATCH 1/2] fix(fs-utils): ignore ETIMEDOUT and EINVAL during scandir --- src/lib/dsn/fs-utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/dsn/fs-utils.ts b/src/lib/dsn/fs-utils.ts index a84141b3f..0c53a2919 100644 --- a/src/lib/dsn/fs-utils.ts +++ b/src/lib/dsn/fs-utils.ts @@ -17,6 +17,8 @@ import * as Sentry from "@sentry/node-core/light"; * - EPERM: Operation not permitted (e.g., file locked, or system-level restriction) * - EISDIR: Path is a directory, not a file (e.g., `.env/` directory instead of `.env` file) * - ENOTDIR: A path component is not a directory (e.g., `/file.txt/child`) + * - ETIMEDOUT: Connection timed out (e.g., transient error on network/cloud-mounted paths) + * - EINVAL: Invalid argument (e.g., transient error on network/cloud-mounted paths) * * All other errors are unexpected and should be reported to Sentry. * @@ -31,7 +33,9 @@ function isIgnorableFileError(error: unknown): boolean { code === "EACCES" || code === "EPERM" || code === "EISDIR" || - code === "ENOTDIR" + code === "ENOTDIR" || + code === "ETIMEDOUT" || + code === "EINVAL" ); } return false; From cf722289fce2e3ba0112568c528173e3e0800d6e Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 21:24:03 +0000 Subject: [PATCH 2/2] fix(fs): ignore ETIMEDOUT in scandir on network mounts --- src/lib/dsn/fs-utils.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/dsn/fs-utils.ts b/src/lib/dsn/fs-utils.ts index 0c53a2919..9360f2a48 100644 --- a/src/lib/dsn/fs-utils.ts +++ b/src/lib/dsn/fs-utils.ts @@ -18,7 +18,6 @@ import * as Sentry from "@sentry/node-core/light"; * - EISDIR: Path is a directory, not a file (e.g., `.env/` directory instead of `.env` file) * - ENOTDIR: A path component is not a directory (e.g., `/file.txt/child`) * - ETIMEDOUT: Connection timed out (e.g., transient error on network/cloud-mounted paths) - * - EINVAL: Invalid argument (e.g., transient error on network/cloud-mounted paths) * * All other errors are unexpected and should be reported to Sentry. * @@ -34,8 +33,7 @@ function isIgnorableFileError(error: unknown): boolean { code === "EPERM" || code === "EISDIR" || code === "ENOTDIR" || - code === "ETIMEDOUT" || - code === "EINVAL" + code === "ETIMEDOUT" ); } return false;