feat user服部署

This commit is contained in:
2025-12-20 21:00:24 +08:00
parent ff1bd1d0b6
commit 69cc960fe5
14 changed files with 83 additions and 28 deletions

View File

@@ -33,7 +33,7 @@ func ErrorHandler(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w
code = http_resp.Failed.Code()
msg = http_resp.Failed.Error()
}
if st.Code() == codes.Unknown {
if st.Code() == codes.Unknown || st.Code() == codes.Unimplemented {
msg = st.Message()
}
@@ -47,6 +47,8 @@ func grpcCodeToHTTPCode(c codes.Code) int {
switch c {
case codes.OK, codes.Unknown:
return http.StatusOK
case codes.Unimplemented:
return http.StatusNotFound
default:
return http.StatusInternalServerError
}