Skip to content

Commit

Permalink
fix: 修复错误码提示问题 (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewshan authored Mar 20, 2023
1 parent e1038f0 commit d8108b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion release/conf/i18n/zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
400190 = "限流ID非法" #InvalidFluxRateLimitId
400191 = "限流qps非法" #InvalidFluxRateLimitQps
400192 = "限流标识非法" #InvalidFluxRateLimitSetKey
400201 = "资源已存在" #ExistedResource
400201 = "同名资源已存在" #ExistedResource
400202 = "未找到资源" #NotFoundResource
400203 = "当前命名空间存在服务,请先删除服务,再删除命名空间" #NamespaceExistedServices
400204 = "当前服务存在实例,请先删除实例,再删除服务" #ServiceExistedInstances
Expand Down
2 changes: 1 addition & 1 deletion service/circuitbreaker_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (s *Server) updateCircuitBreakerRule(
return storeError2Response(err)
}
if exists {
return api.NewResponse(apimodel.Code_ServiceExistedCircuitBreakers)
return api.NewResponse(apimodel.Code_ExistedResource)
}
if err := s.storage.UpdateCircuitBreakerRule(cbRule); err != nil {
log.Error(err.Error(), utils.ZapRequestID(requestID))
Expand Down
2 changes: 1 addition & 1 deletion service/faultdetect_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (s *Server) updateFaultDetectRule(ctx context.Context, request *apifault.Fa
return storeError2Response(err)
}
if exists {
return api.NewAnyDataResponse(apimodel.Code_FaultDetectRuleExisted, fdRuleId)
return api.NewAnyDataResponse(apimodel.Code_ExistedResource, fdRuleId)
}
if err := s.storage.UpdateFaultDetectRule(fdRule); err != nil {
log.Error(err.Error(), utils.ZapRequestID(requestID))
Expand Down

0 comments on commit d8108b7

Please sign in to comment.