Skip to content

.Net: Global exceptions vs storage specific exceptions #10883

@markwallace-microsoft

Description

@markwallace-microsoft

Important exceptions like “the collection doesn’t exists” should be agnostic of the storage type, to avoid the need to catch several exception types.

For instance, this code would be preferable and wouldn’t need changes when swapping storage type:

Try {} 

catch (Microsoft.Extensions.VectorData.CollectionNotFoundException e) 

{}

as opposed to:

Try {} 

catch (Exception e) when (e is Qdrant.CollectionNotFoundException or Postgres.CollectionNotFoundException or AzureAiSearch.CollectionNotFoundException or Milvus.CollectionNotFoundException or ...)

{}

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codemsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions