Use a more fitting error type
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
El issue no menciona archivos ni pruebas; empieza por localizar los tipos de retorno anyhow del crate y las API que devuelven tonic::Status. Haz un inventario de cualquier otro error devuelto antes de elegir entre un wrapper y un enum. Se considera terminado cuando exista un diseño de error público acordado que cubra el pattern matching, la conversión y el comportamiento visible para el usuario.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 425
- Forks
- 89
- Merge medio
- 2 h 48 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de qdrant/rust-client
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
qdrant/rust-client#320 ·
-
upsert_points deep-clones the whole request on every call, not only on retryQuizá libre de nuevo @NullSense la tomó hace 7 días y no hay ningún pull request abierto. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
qdrant/rust-client#316 · 3 comentarios ·
-
Option to set TLS domain name and :authority origin (client behind a tunnel/proxy)Quizá libre de nuevo @inamdarmihir la tomó hace 37 días y no hay ningún pull request abierto. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
qdrant/rust-client#306 · 1 comentario ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
qdrant/rust-client#289 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
qdrant/rust-client#272 · 2 reacciones ·
Todos los issues de qdrant/rust-client
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
samkerrcode/opengent#113 ·
Los mantenedores suelen responder en 1 día
-
app bug session
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
backlog
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
sagemathinc/sagebrush#3415 ·
Los mantenedores suelen responder en 1 día
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día