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 6d4879b commit 01e65bdCopy full SHA for 01e65bd
src/schema-convertors/internalToMongoDB.ts
@@ -56,7 +56,7 @@ function parseType(type: SchemaType, signal?: AbortSignal): MongoDBJSONSchema {
56
}
57
58
function parseTypes(types: SchemaType[], signal?: AbortSignal): MongoDBJSONSchema {
59
- if (signal?.aborted) throw new Error('Operation aborted');
+ if (signal?.aborted) throw signal.reason ?? new Error('Operation aborted');
60
const definedTypes = types.filter(type => type.bsonType.toLowerCase() !== 'undefined');
61
const isSingleType = definedTypes.length === 1;
62
if (isSingleType) {
0 commit comments