agent-substrate / agent-substrate/substrate

Create a pattern for reporting fine-grained error details in a machine-readable way

Abierto
#45 1 comentario 0 reacciones 0 asignados Ver en GitHub
area/api area/tests kind/feature prio/P1
Lenguaje dominante
Go
Estrellas
1.8k
Forks
316
Merge medio
2 d 43 min
PR fusionados (30 d)
287

Descripción

Currently, we are testing the error message strings emitted from ate-api-server in functional_test.go. This is pretty fraught, since those messages aren't necessarily going to be stable as code is refactored.

Instead, we should use the [Status.Details field](https://pkg.go.dev/google.golang.org/grpc/status#FromProto) with an ate-specific details proto. We can define a fine-grained code for each logical error, in case clients need to distinguish situations beyond just the canonical code.

For example,
* If we can't find a free worker, we might return a status error where code=RESOURCE_EXHAUSTED, and details has an ateapipb.ErrorDetails proto with fine_grained_code=NO_FREE_WORKERS

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.