agent-substrate / agent-substrate/substrate
Create a pattern for reporting fine-grained error details in a machine-readable way
- 主要语言
- Go
- 星标
- 1.8k
- 派生
- 316
- 平均合并
- 2 天 43 分钟
- 30 天内合并 PR
- 287
描述
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
贡献指南
评估
这个 Issue 还没有评估数据。