Skip to content

Commit 9d84579

Browse files
committed
Revert "Use err.errorNum instead of err.code"
This reverts commit d90713b.
1 parent 54a08ec commit 9d84579

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3584,7 +3584,7 @@ export class Collection<T extends Record<string, any> = any>
35843584
() => true
35853585
);
35863586
} catch (err) {
3587-
if (isArangoError(err) && err.errorNum === DOCUMENT_NOT_FOUND) {
3587+
if (err.code === 404) {
35883588
return false;
35893589
}
35903590
throw err;

src/graph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export class GraphVertexCollection<T extends Record<string, any> = any>
489489
() => true
490490
);
491491
} catch (err) {
492-
if (isArangoError(err) && err.errorNum === DOCUMENT_NOT_FOUND) {
492+
if (err.code === 404) {
493493
return false;
494494
}
495495
throw err;
@@ -894,7 +894,7 @@ export class GraphEdgeCollection<T extends Record<string, any> = any>
894894
() => true
895895
);
896896
} catch (err) {
897-
if (isArangoError(err) && err.errorNum === DOCUMENT_NOT_FOUND) {
897+
if (err.code === 404) {
898898
return false;
899899
}
900900
throw err;

0 commit comments

Comments
 (0)