bosun-ai/swiftide

thiserror; improved error handling

Opened this issue · 0 comments

Throughout the library we currently use anyhow. At several points in the indexing step, it makes (a lot) of sense to have domain specific errors so library users can handle them how they see fit.

Non exclusive, some boundaries I'm thinking off:

  • Internal result of the indexing and query pipelines (Result and Result respectively>)
  • Most concrete transformations
  • Inference calls (SimplePrompt)
  • Embedding calls (EmbeddingModel and SparseEmbeddingModel)

For example, if an inference calls fails due to a rate limit, a node could be retried.