Use a more fitting error type
まだ誰も着手していません。
評価
調査の方向性
この issue にはファイルもテストも記載されていないため、まず crate の anyhow 戻り値型と tonic::Status を返す API を特定します。wrapper と enum のどちらを選ぶか決める前に、返されるその他のエラーもすべて洗い出します。マッチング、変換、ユーザーに見える動作を網羅した、合意済みの公開エラーデザインができれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Currently this crate uses anyhow, which is usually meant for applications, not libraries. This makes it very hard to match on an error, because the error is essentially opaque. As far as I can see, we mostly return ´tonic::Status`, but there may be some APIs that also can return other errors.
The classic way of dealing with this is create a newtype that wraps Status, has a From<Status> impl and allows basically the same functionality (especially matching on Code). We could also create an enum instead, but I should note that this will either make the implementation, the user interface or both needlessly complex. If we have API calls that can return other errors, either have them return their own specific error type or convert whatever error we get to our predefined error type internally.
Another way would be to make the error type opaque, but that has the downside of making it harder for users to implement From<QdrantError> for their own error types, essentially requiring a Box or other indirection.
- 主要言語
- Rust
- スター
- 425
- フォーク
- 89
- 平均マージ
- 2時間 48分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
qdrant/rust-client のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
qdrant/rust-client#320 ·
-
upsert_points deep-clones the whole request on every call, not only on retry再び着手できるかも @NullSense が 7 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
qdrant/rust-client#316 · コメント 3 件 ·
-
Option to set TLS domain name and :authority origin (client behind a tunnel/proxy)再び着手できるかも @inamdarmihir が 37 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
qdrant/rust-client#306 · コメント 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
qdrant/rust-client#289 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
qdrant/rust-client#272 · リアクション 2 件 ·
qdrant/rust-client の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
samkerrcode/opengent#113 ·
メンテナーはふだん 1 日以内に返信
-
app bug session
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sagemathinc/sagebrush#3415 ·
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信