Use a more fitting error type
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
L’issue non indica file né test; inizia individuando i tipi restituiti anyhow del crate e le API che restituiscono tonic::Status. Fai l’inventario di tutti gli altri errori restituiti prima di scegliere tra un wrapper e un enum. Il lavoro è completato quando esiste un design pubblico degli errori concordato che copra il pattern matching, la conversione e il comportamento visibile all’utente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 425
- Fork
- 89
- Merge medio
- 2h 48m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di qdrant/rust-client
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
qdrant/rust-client#320 ·
-
upsert_points deep-clones the whole request on every call, not only on retryForse di nuovo libera @NullSense l’ha presa 7 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
qdrant/rust-client#316 · 3 commenti ·
-
Option to set TLS domain name and :authority origin (client behind a tunnel/proxy)Forse di nuovo libera @inamdarmihir l’ha presa 37 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
qdrant/rust-client#306 · 1 commento ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
qdrant/rust-client#289 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
qdrant/rust-client#272 · 2 reazioni ·
Tutte le issue di qdrant/rust-client
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
samkerrcode/opengent#113 ·
I maintainer di solito rispondono entro 1 giorno
-
app bug session
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sagemathinc/sagebrush#3415 ·
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno