Versions in this module Expand all Collapse all v1 v1.24.3 Apr 25, 2026 Changes in this version + const ErrAlreadyInitialized + const ErrAmbiguousIndexKeyPattern + const ErrArrayOperatorElemAtFirstArgMustBeArray + const ErrAuthenticationFailed + const ErrBackgroundOperationInProgressForNamespace + const ErrBadValue + const ErrBsonObjectTooLarge + const ErrCanNotBeTypeArray + const ErrCannotBackfillArray + const ErrCannotCreateIndex + const ErrChangeStreamBadResumeToken + const ErrClientMetadataCannotBeMutated + const ErrCollectionUUIDMismatch + const ErrCommandNotFound + const ErrCommandNotSupported + const ErrCommandNotSupportedOnView + const ErrConflictingUpdateOperators + const ErrConversionFailure + const ErrCursorInUse + const ErrCursorNotFound + const ErrDbAlreadyExists + const ErrDocumentAfterUpdateLargerThanMaxSize + const ErrDocumentFailedValidation + const ErrDocumentToUpsertLargerThanMaxSize + const ErrDollarAbsCantTakeLongMinValue + const ErrDollarAddNumericOrDateTypes + const ErrDollarAddOnlyOneDate + const ErrDollarArrayElemAtSecondArgArgMustBe32Bit + const ErrDollarArrayElemAtSecondArgArgMustBeNumeric + const ErrDollarArrayToObjectAllMustBeArrays + const ErrDollarArrayToObjectAllMustBeObjects + const ErrDollarArrayToObjectArrayKeyMustBeString + const ErrDollarArrayToObjectBadInputTypeFormat + const ErrDollarArrayToObjectIncorrectArrayLength + const ErrDollarArrayToObjectIncorrectNumberOfKeys + const ErrDollarArrayToObjectObjectKeyMustBeString + const ErrDollarArrayToObjectRequiresArray + const ErrDollarArrayToObjectRequiresObjectWithKAndV + const ErrDollarCondBadParameter + const ErrDollarCondMissingElseParameter + const ErrDollarCondMissingIfParameter + const ErrDollarCondMissingThenParameter + const ErrDollarIfNullRequiresAtLeastTwoArgs + const ErrDollarInRequiresArray + const ErrDollarLnMustBePositiveNumber + const ErrDollarLog10MustBePositiveNumber + const ErrDollarLogArgumentMustBeNumeric + const ErrDollarLogBaseMustBeGreaterThanOne + const ErrDollarLogBaseMustBeNumeric + const ErrDollarLogNumberMustBePositive + const ErrDollarMergeObjectsInvalidType + const ErrDollarModByZeroProhibited + const ErrDollarModOnlyNumeric + const ErrDollarObjectToArrayRequiresObject + const ErrDollarPowBaseMustBeNumeric + const ErrDollarPowExponentInvalidForZeroBase + const ErrDollarPowExponentMustBeNumeric + const ErrDollarPrefixedFieldName + const ErrDollarRandNonEmptyArgument + const ErrDollarRoundFirstArgMustBeNumeric + const ErrDollarRoundOverflowInt64 + const ErrDollarRoundPrecisionMustBeIntegral + const ErrDollarRoundPrecisionOutOfRange + const ErrDollarSetFieldRequiresObject + const ErrDollarSetFieldUnknownArgument + const ErrDollarSizeRequiresArray + const ErrDollarSliceInvalidInput + const ErrDollarSliceInvalidSignThirdArg + const ErrDollarSliceInvalidTypeSecondArg + const ErrDollarSliceInvalidTypeThirdArg + const ErrDollarSliceInvalidValueSecondArg + const ErrDollarSliceInvalidValueThirdArg + const ErrDollarSqrtGreaterOrEqualToZero + const ErrDollarSwitchBadArgument + const ErrDollarSwitchNoMatchingBranchAndNoDefault + const ErrDollarSwitchRequiresArrayForBranches + const ErrDollarSwitchRequiresAtLeastOneBranch + const ErrDollarSwitchRequiresCaseExpressionForBranch + const ErrDollarSwitchRequiresObject + const ErrDollarSwitchRequiresObjectForEachBranch + const ErrDollarSwitchRequiresThenExpressionForBranch + const ErrDollarSwitchUnknownArgumentForBranch + const ErrDottedFieldName + const ErrDuplicateKey + const ErrDurationOverflow + const ErrEmptyFieldName + const ErrExactlyOneTextIndex + const ErrExceededMemoryLimit + const ErrFailedToParse + const ErrGraphContainsCycle + const ErrHashedIndexDoNotSupportArrayValues + const ErrIllegalOperation + const ErrImmutableField + const ErrIndexAlreadyExists + const ErrIndexBuildAborted + const ErrIndexKeySpecsConflict + const ErrIndexNotFound + const ErrIndexOptionsConflict + const ErrInsufficientPrivilege + const ErrIntermediateResultTooLarge + const ErrInternalError + const ErrInvalidIndexSpecificationOption + const ErrInvalidLength + const ErrInvalidNamespace + const ErrInvalidOptions + const ErrInvalidUUID + const ErrKeyCannotContainNullByte + const ErrLocation10065 + const ErrLocation13026 + const ErrLocation13027 + const ErrLocation13068 + const ErrLocation13103 + const ErrLocation13111 + const ErrLocation13548 + const ErrLocation15947 + const ErrLocation15952 + const ErrLocation15955 + const ErrLocation15957 + const ErrLocation15958 + const ErrLocation15959 + const ErrLocation15972 + const ErrLocation15976 + const ErrLocation15981 + const ErrLocation15998 + const ErrLocation16004 + const ErrLocation16006 + const ErrLocation16007 + const ErrLocation16020 + const ErrLocation16034 + const ErrLocation16035 + const ErrLocation16410 + const ErrLocation16411 + const ErrLocation16433 + const ErrLocation16702 + const ErrLocation16747 + const ErrLocation16748 + const ErrLocation16749 + const ErrLocation16755 + const ErrLocation16764 + const ErrLocation16800 + const ErrLocation16801 + const ErrLocation16804 + const ErrLocation16874 + const ErrLocation16875 + const ErrLocation16876 + const ErrLocation16878 + const ErrLocation16879 + const ErrLocation16880 + const ErrLocation16882 + const ErrLocation16883 + const ErrLocation16979 + const ErrLocation16990 + const ErrLocation16994 + const ErrLocation17040 + const ErrLocation17041 + const ErrLocation17042 + const ErrLocation17043 + const ErrLocation17044 + const ErrLocation17045 + const ErrLocation17046 + const ErrLocation17047 + const ErrLocation17048 + const ErrLocation17049 + const ErrLocation17053 + const ErrLocation17261 + const ErrLocation17276 + const ErrLocation17308 + const ErrLocation17310 + const ErrLocation17385 + const ErrLocation18533 + const ErrLocation18534 + const ErrLocation18535 + const ErrLocation18536 + const ErrLocation18537 + const ErrLocation18628 + const ErrLocation18629 + const ErrLocation28625 + const ErrLocation28646 + const ErrLocation28647 + const ErrLocation28648 + const ErrLocation28650 + const ErrLocation28651 + const ErrLocation28656 + const ErrLocation28657 + const ErrLocation28664 + const ErrLocation28745 + const ErrLocation28746 + const ErrLocation28747 + const ErrLocation28748 + const ErrLocation28749 + const ErrLocation28765 + const ErrLocation28769 + const ErrLocation28803 + const ErrLocation28808 + const ErrLocation28809 + const ErrLocation28810 + const ErrLocation28811 + const ErrLocation28812 + const ErrLocation28818 + const ErrLocation28822 + const ErrLocation2942500 + const ErrLocation2942501 + const ErrLocation2942502 + const ErrLocation2942503 + const ErrLocation2942504 + const ErrLocation2942505 + const ErrLocation2942506 + const ErrLocation3041701 + const ErrLocation3041702 + const ErrLocation3041703 + const ErrLocation3041704 + const ErrLocation31002 + const ErrLocation31022 + const ErrLocation31023 + const ErrLocation31024 + const ErrLocation31034 + const ErrLocation31095 + const ErrLocation31109 + const ErrLocation31119 + const ErrLocation31120 + const ErrLocation31138 + const ErrLocation31170 + const ErrLocation31249 + const ErrLocation31250 + const ErrLocation31253 + const ErrLocation31254 + const ErrLocation31256 + const ErrLocation31271 + const ErrLocation31276 + const ErrLocation31308 + const ErrLocation31319 + const ErrLocation31320 + const ErrLocation31321 + const ErrLocation31325 + const ErrLocation31393 + const ErrLocation31395 + const ErrLocation31441 + const ErrLocation31465 + const ErrLocation327391 + const ErrLocation327392 + const ErrLocation34435 + const ErrLocation34443 + const ErrLocation34444 + const ErrLocation34445 + const ErrLocation34446 + const ErrLocation34447 + const ErrLocation34448 + const ErrLocation34449 + const ErrLocation34450 + const ErrLocation34451 + const ErrLocation34452 + const ErrLocation34453 + const ErrLocation34454 + const ErrLocation34455 + const ErrLocation34460 + const ErrLocation34461 + const ErrLocation34462 + const ErrLocation34463 + const ErrLocation34464 + const ErrLocation34465 + const ErrLocation34466 + const ErrLocation34467 + const ErrLocation34468 + const ErrLocation34471 + const ErrLocation34473 + const ErrLocation40075 + const ErrLocation40076 + const ErrLocation40077 + const ErrLocation40078 + const ErrLocation40079 + const ErrLocation40080 + const ErrLocation40085 + const ErrLocation40086 + const ErrLocation40087 + const ErrLocation40090 + const ErrLocation40091 + const ErrLocation40092 + const ErrLocation40093 + const ErrLocation40094 + const ErrLocation40096 + const ErrLocation40097 + const ErrLocation40100 + const ErrLocation40101 + const ErrLocation40102 + const ErrLocation40103 + const ErrLocation40104 + const ErrLocation40105 + const ErrLocation40147 + const ErrLocation40156 + const ErrLocation40158 + const ErrLocation40160 + const ErrLocation40169 + const ErrLocation40177 + const ErrLocation40181 + const ErrLocation40185 + const ErrLocation40191 + const ErrLocation40192 + const ErrLocation40193 + const ErrLocation40194 + const ErrLocation40195 + const ErrLocation40196 + const ErrLocation40197 + const ErrLocation40198 + const ErrLocation40199 + const ErrLocation40200 + const ErrLocation40201 + const ErrLocation40202 + const ErrLocation40218 + const ErrLocation40228 + const ErrLocation40229 + const ErrLocation40234 + const ErrLocation40235 + const ErrLocation40236 + const ErrLocation40237 + const ErrLocation40238 + const ErrLocation40239 + const ErrLocation40240 + const ErrLocation40241 + const ErrLocation40242 + const ErrLocation40243 + const ErrLocation40244 + const ErrLocation40245 + const ErrLocation40246 + const ErrLocation40257 + const ErrLocation40258 + const ErrLocation40260 + const ErrLocation40261 + const ErrLocation40272 + const ErrLocation40319 + const ErrLocation40321 + const ErrLocation40323 + const ErrLocation40352 + const ErrLocation40414 + const ErrLocation40485 + const ErrLocation40489 + const ErrLocation40515 + const ErrLocation40516 + const ErrLocation40517 + const ErrLocation40518 + const ErrLocation40519 + const ErrLocation40520 + const ErrLocation40521 + const ErrLocation40522 + const ErrLocation40523 + const ErrLocation40524 + const ErrLocation40525 + const ErrLocation40533 + const ErrLocation40535 + const ErrLocation40536 + const ErrLocation40539 + const ErrLocation40540 + const ErrLocation40541 + const ErrLocation40542 + const ErrLocation40600 + const ErrLocation40601 + const ErrLocation40602 + const ErrLocation40603 + const ErrLocation40621 + const ErrLocation40684 + const ErrLocation4161102 + const ErrLocation4161103 + const ErrLocation4161104 + const ErrLocation4161105 + const ErrLocation4161106 + const ErrLocation4161107 + const ErrLocation4161108 + const ErrLocation4161109 + const ErrLocation4341107 + const ErrLocation4890500 + const ErrLocation4940400 + const ErrLocation4940401 + const ErrLocation50687 + const ErrLocation50692 + const ErrLocation50694 + const ErrLocation50695 + const ErrLocation50696 + const ErrLocation50699 + const ErrLocation50700 + const ErrLocation50723 + const ErrLocation50752 + const ErrLocation50759 + const ErrLocation50840 + const ErrLocation50989 + const ErrLocation51003 + const ErrLocation51024 + const ErrLocation51044 + const ErrLocation51045 + const ErrLocation51047 + const ErrLocation5107200 + const ErrLocation5107201 + const ErrLocation51074 + const ErrLocation51075 + const ErrLocation51091 + const ErrLocation51103 + const ErrLocation51104 + const ErrLocation51105 + const ErrLocation51106 + const ErrLocation51107 + const ErrLocation51108 + const ErrLocation51109 + const ErrLocation51110 + const ErrLocation51111 + const ErrLocation51132 + const ErrLocation51134 + const ErrLocation51151 + const ErrLocation51156 + const ErrLocation51178 + const ErrLocation51183 + const ErrLocation51185 + const ErrLocation51186 + const ErrLocation51187 + const ErrLocation51191 + const ErrLocation51246 + const ErrLocation51247 + const ErrLocation51276 + const ErrLocation5166301 + const ErrLocation5166302 + const ErrLocation5166303 + const ErrLocation5166304 + const ErrLocation5166305 + const ErrLocation5166307 + const ErrLocation5166400 + const ErrLocation5166401 + const ErrLocation5166402 + const ErrLocation5166403 + const ErrLocation5166404 + const ErrLocation5166405 + const ErrLocation5166406 + const ErrLocation51743 + const ErrLocation51744 + const ErrLocation51745 + const ErrLocation51746 + const ErrLocation51747 + const ErrLocation51748 + const ErrLocation51749 + const ErrLocation51750 + const ErrLocation51751 + const ErrLocation5339900 + const ErrLocation5339901 + const ErrLocation5339902 + const ErrLocation5371601 + const ErrLocation5371602 + const ErrLocation5371603 + const ErrLocation5423900 + const ErrLocation5423901 + const ErrLocation5423902 + const ErrLocation5429413 + const ErrLocation5429414 + const ErrLocation5429513 + const ErrLocation5439007 + const ErrLocation5439008 + const ErrLocation5439009 + const ErrLocation5439010 + const ErrLocation5439012 + const ErrLocation5439013 + const ErrLocation5439014 + const ErrLocation5439015 + const ErrLocation5439016 + const ErrLocation5439017 + const ErrLocation5439018 + const ErrLocation5490710 + const ErrLocation55 + const ErrLocation5624900 + const ErrLocation5624901 + const ErrLocation5626500 + const ErrLocation5654600 + const ErrLocation5654601 + const ErrLocation5654602 + const ErrLocation5687301 + const ErrLocation5687302 + const ErrLocation5687400 + const ErrLocation5687401 + const ErrLocation5733201 + const ErrLocation5733401 + const ErrLocation5733402 + const ErrLocation5733403 + const ErrLocation5733406 + const ErrLocation5733408 + const ErrLocation5733409 + const ErrLocation5739101 + const ErrLocation5746102 + const ErrLocation5787801 + const ErrLocation5787900 + const ErrLocation5787901 + const ErrLocation5787902 + const ErrLocation5787903 + const ErrLocation5787906 + const ErrLocation5787907 + const ErrLocation5787908 + const ErrLocation5788001 + const ErrLocation5788002 + const ErrLocation5788003 + const ErrLocation5788004 + const ErrLocation5788005 + const ErrLocation5788200 + const ErrLocation5788604 + const ErrLocation5858203 + const ErrLocation5860402 + const ErrLocation5876900 + const ErrLocation5897900 + const ErrLocation5946802 + const ErrLocation5976500 + const ErrLocation6007200 + const ErrLocation6045000 + const ErrLocation605001 + const ErrLocation6050106 + const ErrLocation6050202 + const ErrLocation6050204 + const ErrLocation6053600 + const ErrLocation6586400 + const ErrLocation7429703 + const ErrLocation7436100 + const ErrLocation7555701 + const ErrLocation7555702 + const ErrLocation7749501 + const ErrLocation7750301 + const ErrLocation7750302 + const ErrLocation7750303 + const ErrLocation8993000 + const ErrMaxSubPipelineDepthExceeded + const ErrMaxTimeMSExpired + const ErrMechanismUnavailable + const ErrMergeStageNoMatchingDocument + const ErrNamespaceExists + const ErrNamespaceNotFound + const ErrNamespaceNotSharded + const ErrNotExactValueField + const ErrNotImplemented + const ErrNotSingleValueField + const ErrNotWritablePrimary + const ErrOperationFailed + const ErrOperationNotSupportedInTransaction + const ErrOptionNotSupportedOnView + const ErrOverflow + const ErrPathNotViable + const ErrProtocolError + const ErrQueryFeatureNotAllowed + const ErrRangeArgumentExpressionArgsOutOfRange + const ErrRoleNotFound + const ErrShardKeyNotFound + const ErrTypeMismatch + const ErrUnableToFindIndex + const ErrUnauthorized + const ErrUnknownBsonField + const ErrUnrecognizedCommand + const ErrUnset + const ErrUnsupportedFormat + const ErrUnsupportedOpQueryCommand + const ErrUserCountLimitExceeded + const ErrUserNotFound + const ErrViewDepthLimitExceeded + func MapWriteErrors(ctx context.Context, res wirebson.AnyDocument) wirebson.AnyDocument + type Code int32 + func MapWrappedCode(code int32) Code + func (i Code) String() string + type Error struct + Argument string + func Make(ctx context.Context, err error, arg string, l *slog.Logger) *Error + func New(code Code, msg string) *Error + func NewWithArgument(code Code, msg, argument string) *Error + func (e *Error) Error() string + func (e *Error) GoString() string