fix(platform): guard unscoped raw field queries
This commit is contained in:
@@ -186,6 +186,10 @@ func (h *Handler) handleOpsHealth(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (h *Handler) write(w http.ResponseWriter, r *http.Request, data any, err error) {
|
||||
if err != nil {
|
||||
if clientErr, ok := asClientError(err); ok {
|
||||
httpx.WriteError(w, http.StatusBadRequest, clientErr.Code, clientErr.Message, "", traceID(r))
|
||||
return
|
||||
}
|
||||
httpx.WriteError(w, http.StatusInternalServerError, "INTERNAL", "服务处理失败", err.Error(), traceID(r))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user