Skip to content

.Net: [MEVD] Consider removing VectorStoreRecordMappingException #11552

@roji

Description

@roji

As discussed with @westey-m offline... We currently wrap any exceptions coming out of mapping (serialization/deserialization) with VectorStoreRecordMappingException. Especially now that we've removed custom mapping, any exceptions coming out of mapping are either errors in connector code, or in user code (e.g. they're passing int via Dictionary<string, object?> where the property is configured as string), or in connector code. In general, such coding errors aren't meant to be caught and handle (like I/O errors), but rather the code should be fixed.

So I think it's fine to just have the mapping code throw InvalidCastException, ideally with an informative message about which property got a mismatched value.

Not strictly speaking necessary for Build, but I'd do this anyway as it's pretty simple and would simplify the code etc.

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencemsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

No type

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions