8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb3e36a commit 0aac3deCopy full SHA for 0aac3de
readme.md
@@ -108,6 +108,16 @@ import { MongoErrorCodes } from "mongo-error-codes";
108
console.log(MongoErrorCodes.DuplicateKey); // 11000
109
```
110
111
+#### `ErrorCategory` (type)
112
+
113
+Represents an error category
114
115
+```ts
116
+import { ErrorCategory } from 'monog-error-codes'
117
118
+const errorCategory: ErrorCategory = "NotPrimaryError";
119
+```
120
121
#### `MongoError` (interface)
122
123
Represents a MongoDB error code object.
@@ -117,6 +127,7 @@ export interface MongoError {
127
code: number;
128
name: string;
129
description?: string;
130
+ categories?: ErrorCategory;
131
}
132
133
0 commit comments