Error code ErrorCode.INVALID_COLLECTION_NAME is used in case where createCollection fails due to Collection with given name existing but with different settings. This is misleading, in particular for metrics since although actual message:
Invalid collection name: provided collection ('%s') already exists with different collection options
explains problem bit better our metrics only contain actual ErrorCode.
So while usually we try not to change ErrorCode constants, in this case it seems necessary to change it to improve Observability.
Error code
ErrorCode.INVALID_COLLECTION_NAME
is used in case wherecreateCollection
fails due to Collection with given name existing but with different settings. This is misleading, in particular for metrics since although actual message:explains problem bit better our metrics only contain actual
ErrorCode
. So while usually we try not to changeErrorCode
constants, in this case it seems necessary to change it to improve Observability.