We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
controller 中没有其他的返回接口,带 error 只能返回 5xx,无法返回 401/403 之类的错误 看调用栈也只是捕获了异常,没有利用 ctx 反向传递结果,请问这种架构下如何自定义返回码呢?
func (c *cUser) SignIn(ctx context.Context, req *v1.UserSignInReq) (res *v1.UserSignInRes, err error) { err = service.User().SignIn(ctx, model.UserSignInInput{ Passport: req.Passport, Password: req.Password, }) return }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
controller 中没有其他的返回接口,带 error 只能返回 5xx,无法返回 401/403 之类的错误
看调用栈也只是捕获了异常,没有利用 ctx 反向传递结果,请问这种架构下如何自定义返回码呢?
The text was updated successfully, but these errors were encountered: