Open akoserwal opened 3 months ago
If I were you, I would prefer to add a comment to the rpc api, like below:
// GetUser return a user. It will return an error with reason "USER_NOT_FOUND" when user is not found.
rpc GetUser (GetUserRequest) returns (GetUserReply)
I see a way to definite error codes, but it doesn't update the open API spec generation with HTTP error codes https://go-kratos.dev/en/docs/component/errors