Skip to content

Commit 872ab03

Browse files
Update src/helpers/indexCheck.ts
Co-authored-by: Himanshu Singh <[email protected]>
1 parent 9511652 commit 872ab03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/indexCheck.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function checkIndexUsage(
7272
);
7373
}
7474
} catch (error) {
75-
if (error instanceof Error && error.message.includes("Index check failed")) {
75+
if (error instanceof MongoDBError && error.code === ErrorCodes.ForbiddenCollscan) {
7676
throw error;
7777
}
7878

0 commit comments

Comments
 (0)