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 95ed2f7 commit 4ae3ee0Copy full SHA for 4ae3ee0
Sources/MongoSwift/BSON/BSONDocument.swift
@@ -229,7 +229,7 @@ extension BSONDocument {
229
}
230
231
guard success else {
232
- throw BSONError.InternalError(
+ throw BSONError.DocumentTooLargeError(
233
message: "Failed to merge \(doc) with \(self). This is likely due to " +
234
"the merged document being too large."
235
)
Sources/MongoSwift/BSON/BSONError.swift
@@ -38,6 +38,10 @@ public enum BSONError {
38
"Failed to set value for key \(forKey) to \(value) with" +
39
" BSON type \(value.bsonType): document too large"
40
41
+
42
+ internal init(message: String) {
43
+ self.message = message
44
+ }
45
46
47
0 commit comments