Skip to content

Commit

Permalink
docs:优化错误信息描述 (#664)
Browse files Browse the repository at this point in the history
* docs:优化错误信息描述

* Update zh.toml

* fix:i18n集成测试修复

* fix:修复单元测试问题

* fix:修复CI
  • Loading branch information
chuntaojun authored Sep 16, 2022
1 parent 9029623 commit 168376b
Show file tree
Hide file tree
Showing 6 changed files with 202 additions and 217 deletions.
304 changes: 152 additions & 152 deletions apiserver/httpserver/i18n/zh.toml
Original file line number Diff line number Diff line change
@@ -1,152 +1,152 @@
200000 = "执行成功" #ExecuteSuccess
200001 = "服务发现数据无变化" #DataNoChange
200002 = "数据没有变化, 无需更新" #NoNeedUpdate
400000 = "请求错误" #BadRequest
400001 = "请求解析失败" #ParseException
400002 = "空请求" #EmptyRequest
400003 = "批量数据超过限制" #BatchSizeOverLimit
400004 = "服务发现资源非法" #InvalidDiscoverResource
400100 = "请求ID非法" #InvalidRequestID
400101 = "用户名非法" #InvalidUserName
400102 = "用户token非法" #InvalidUserToken
400103 = "参数非法" #InvalidParameter
400104 = "查询实例参数为空" #EmptyQueryParameter
400105 = "查询实例, 需要(服务,命名空间)或主机作为参数" #InvalidQueryInsParameter
400110 = "命名空间名称非法" #InvalidNamespaceName
400111 = "命名空间拥有人非法" #InvalidNamespaceOwners
400112 = "命名空间token非法" #InvalidNamespaceToken
400120 = "服务名称非法" #InvalidServiceName
400121 = "服务拥有人非法" #InvalidServiceOwners
400122 = "服务token非法" #InvalidServiceToken
400123 = "服务元数据非法" #InvalidServiceMetadata
400124 = "服务端口非法" #InvalidServicePorts
400125 = "服务所属业务非法" #InvalidServiceBusiness
400126 = "服务所属部门非法" #InvalidServiceDepartment
400127 = "服务cmdb非法" #InvalidServiceCMDB
400128 = "服务备注非法" #InvalidServiceComment
400129 = "服务别名备注非法" #InvalidServiceAliasComment
400130 = "实例ID非法" #InvalidInstanceID
400131 = "实例Host非法" #InvalidInstanceHost
400132 = "实例端口非法" #InvalidInstancePort
400133 = "实例别名非法" #InvalidServiceAlias
400134 = "当前命名空间不运行创建sid类型别名" #InvalidNamespaceWithAlias
400135 = "服务别名拥有者非法" #InvalidServiceAliasOwners
400136 = "实例协议非法" #InvalidInstanceProtocol
400137 = "实例版本非法" #InvalidInstanceVersion
400138 = "实例逻辑集合非法" #InvalidInstanceLogicSet
400139 = "实例隔离设置非法" #InvalidInstanceIsolate
400140 = "服务端未开启健康检查" #HealthCheckNotOpen
400141 = "在已被禁用的实例上进行心跳" #HeartbeatOnDisabledIns
400142 = "心跳超限, 实例仅支持每秒1次心跳" #HeartbeatExceedLimit
400143 = "未找到心跳类型" #HeartbeatTypeNotFound
400150 = "元数据长度过长或包含非法字符" #InvalidMetadata
400151 = "限频ID非法" #InvalidRateLimitID
400152 = "限频标签非法" #InvalidRateLimitLabels
400153 = "限频数量非法" #InvalidRateLimitAmounts
400154 = "限流名称非法" #InvalidRateLimitName
400160 = "熔断ID非法" #InvalidCircuitBreakerID
400161 = "熔断版本非法" #InvalidCircuitBreakerVersion
400162 = "熔断名称非法" #InvalidCircuitBreakerName
400163 = "熔断命名空间ID非法" #InvalidCircuitBreakerNamespace
400164 = "熔断所属人ID非法" #InvalidCircuitBreakerOwners
400165 = "熔断token非法" #InvalidCircuitBreakerToken
400166 = "熔断所属业务非法" #InvalidCircuitBreakerBusiness
400167 = "熔断所属部门非法" #InvalidCircuitBreakerDepartment
400168 = "熔断备注非法" #InvalidCircuitBreakerComment
400170 = "服务有已存在的网格" #ServicesExistedMesh
400171 = "当前资源有已存在的网格" #ResourcesExistedMesh
400172 = "网格参数非法" #InvalidMeshParameter
400180 = "平台ID非法" #InvalidPlatformID
400181 = "平台名称非法" #InvalidPlatformName
400182 = "平台域名非法" #InvalidPlatformDomain
400183 = "平台qps非法" #InvalidPlatformQPS
400184 = "平台token非法" #InvalidPlatformToken
400185 = "平台拥有人非法" #InvalidPlatformOwner
400186 = "平台所属部们非法" #InvalidPlatformDepartment
400187 = "平台备注非法" #InvalidPlatformComment
400188 = "未找到平台" #NotFoundPlatform
400190 = "限流ID非法" #InvalidFluxRateLimitId
400191 = "限流qps非法" #InvalidFluxRateLimitQps
400192 = "限流标识非法" #InvalidFluxRateLimitSetKey
400201 = "资源已存在" #ExistedResource
400202 = "未找到资源" #NotFoundResource
400203 = "某些服务在当前命名空间已存在" #NamespaceExistedServices
400204 = "某些实例在当前服务已存在" #ServiceExistedInstances
400205 = "某些路由在当前服务已存在" #ServiceExistedRoutings
400206 = "某些限流在当前服务已存在" #ServiceExistedRateLimits
400207 = "存在已发布配置" #ExistReleasedConfig
400208 = "实例请求重复" #SameInstanceRequest
400209 = "某些熔断在当前服务已存在" #ServiceExistedCircuitBreakers
400210 = "某些别名在当前服务已存在" #ServiceExistedAlias
400211 = "某些网格资源在当前命名空间已存在" #NamespaceExistedMeshResources
400212 = "某些熔断在当前命名空间已存在" #NamespaceExistedCircuitBreakers
400213 = "服务已被某些网格订阅" #ServiceSubscribedByMeshes
400214 = "服务已存在限流配置" #ServiceExistedFluxRateLimits
400215 = "用户已存在" #UserExisted
400216 = "用户组已存在" #UserGroupExisted
400217 = "鉴权策略规则已存在" #AuthStrategyRuleExisted
400218 = "某些子账号已属当前拥有人" #SubAccountExisted
400301 = "服务未找到" #NotFoundService
400302 = "路由未找到" #NotFoundRouting
400303 = "示例未找到" #NotFoundInstance
400304 = "服务别名未找到" #NotFoundServiceAlias
400305 = "命名空间未找到" #NotFoundNamespace
400306 = "未找到和当前服务别名关联的服务" #NotFoundSourceService
400307 = "限流规则未找到" #NotFoundRateLimit
400308 = "熔断规则未找到" #NotFoundCircuitBreaker
400309 = "主配置未找到" #NotFoundMasterConfig
400310 = "标签配置未找到" #NotFoundTagConfig
400311 = "未找到标签或服务, 或者关系已存在" #NotFoundTagConfigOrService
400312 = "用户未找到" #NotFoundUser
400313 = "拥有人用户未找到" #NotFoundOwnerUser
400314 = "用户组未找到" #NotFoundUserGroup
400315 = "鉴权策略规则未找到" #NotFoundAuthStrategyRule
400401 = "客户端API未开放" #ClientAPINotOpen
400402 = "不允许请求当前业务服务" #NotAllowBusinessService
400410 = "用户所有人非法" #InvalidUserOwners
400411 = "用户ID非法" #InvalidUserID
400412 = "用户密码非法" #InvalidUserPassword
400413 = "用户手机号非法" #InvalidUserMobile
400414 = "用户邮件非法" #InvalidUserEmail
400420 = "用户组所有人的属性非法" #InvalidUserGroupOwners
400421 = "用户组ID非法" #InvalidUserGroupID
400430 = "鉴权策略规则拥有人非法" #InvalidAuthStrategyOwners
400431 = "鉴权策略规则名称非法" #InvalidAuthStrategyName
400432 = "鉴权策略ID非法" #InvalidAuthStrategyID
400440 = "principal类型非法" #InvalidPrincipalType
400501 = "服务别名不允许更新" #NotAllowAliasUpdate
400502 = "服务别名不允许创建实例" #NotAllowAliasCreateInstance
400503 = "服务别名不允许创建路由规则" #NotAllowAliasCreateRouting
400504 = "仅允许源服务可以创建别名" #NotAllowCreateAliasForAlias
400505 = "服务别名不允许创建限流规则" #NotAllowAliasCreateRateLimit
400506 = "服务别名不允许绑定规则" #NotAllowAliasBindRule
400507 = "不允许不同的命名空间绑定同一规则" #NotAllowDifferentNamespaceBindRule
400508 = "不允许修改默认策略" #NotAllowModifyDefaultStrategyPrincipal
400801 = "配置文件组名非法" #InvalidConfigFileGroupName
400802 = "配置文件名称非法" #InvalidConfigFileName
400803 = "配置文件内容过长" #InvalidConfigFileContentLength
400804 = "非法的配置文件格式,支持的格式有: json,xml,html,properties,text,yaml" #InvalidConfigFileFormat
400805 = "配置文件标签非法, 标签应该是成对的, 比如key1,value1,key2,value2, 并且key,value应是非空白字符" #InvalidConfigFileTags
400806 = "监视配置文件格式非法" #InvalidWatchConfigFileFormat
400807 = "无法找到配置文件" #NotFoundResourceConfigFile
400808 = "invalid config file template name" #InvalidConfigFileTemplateName
401000 = "未经授权" #Unauthorized
401001 = "权限不被允许" #NotAllowedAccess
401002 = "鉴权token为空" #EmptyAutToken
401003 = "token已被禁用" #TokenDisabled
401004 = "token不存在" #TokenNotExisted
403001 = "ip达到服务端限制" #IPRateLimit
403002 = "api达到服务端限制" #APIRateLimit
404001 = "无法找到主机的cmdb" #CMDBNotFindHost
409000 = "数据有冲突, 请再次重试" #DataConflict
429001 = "你的实例请求过多" #InstanceTooManyRequests
500000 = "执行异常" #ExecuteException
500001 = "存储层异常" #StoreLayerException
500002 = "cmdb插件异常" #CMDBPluginException
500004 = "解析路由规则失败" #ParseRoutingException
500005 = "解析限频规则失败" #ParseRateLimitException
500006 = "解析熔断规则失败" #ParseCircuitBreakerException
500007 = "心跳异常" #HeartbeatException
500008 = "实例异步注册超时" #InstanceRegisTimeout
500100 = "token验证异常" #AuthTokenVerifyException
500101 = "角色操作异常" #OperationRoleException
200000 = "执行成功" #ExecuteSuccess
200001 = "服务发现数据无变化" #DataNoChange
200002 = "数据没有变化, 无需更新" #NoNeedUpdate
400000 = "请求错误" #BadRequest
400001 = "请求解析失败" #ParseException
400002 = "空请求" #EmptyRequest
400003 = "批量数据超过限制" #BatchSizeOverLimit
400004 = "服务发现资源非法" #InvalidDiscoverResource
400100 = "请求ID非法" #InvalidRequestID
400101 = "用户名非法" #InvalidUserName
400102 = "用户token非法" #InvalidUserToken
400103 = "参数非法" #InvalidParameter
400104 = "查询实例参数为空" #EmptyQueryParameter
400105 = "查询实例, 需要(服务,命名空间)或主机作为参数" #InvalidQueryInsParameter
400110 = "命名空间名称非法" #InvalidNamespaceName
400111 = "命名空间拥有人非法" #InvalidNamespaceOwners
400112 = "命名空间token非法" #InvalidNamespaceToken
400120 = "服务名称非法" #InvalidServiceName
400121 = "服务拥有人非法" #InvalidServiceOwners
400122 = "服务token非法" #InvalidServiceToken
400123 = "服务元数据非法" #InvalidServiceMetadata
400124 = "服务端口非法" #InvalidServicePorts
400125 = "服务所属业务非法" #InvalidServiceBusiness
400126 = "服务所属部门非法" #InvalidServiceDepartment
400127 = "服务cmdb非法" #InvalidServiceCMDB
400128 = "服务备注非法" #InvalidServiceComment
400129 = "服务别名备注非法" #InvalidServiceAliasComment
400130 = "实例ID非法" #InvalidInstanceID
400131 = "实例Host非法" #InvalidInstanceHost
400132 = "实例端口非法" #InvalidInstancePort
400133 = "实例别名非法" #InvalidServiceAlias
400134 = "当前命名空间不运行创建sid类型别名" #InvalidNamespaceWithAlias
400135 = "服务别名拥有者非法" #InvalidServiceAliasOwners
400136 = "实例协议非法" #InvalidInstanceProtocol
400137 = "实例版本非法" #InvalidInstanceVersion
400138 = "实例逻辑集合非法" #InvalidInstanceLogicSet
400139 = "实例隔离设置非法" #InvalidInstanceIsolate
400140 = "服务端未开启健康检查" #HealthCheckNotOpen
400141 = "在已被禁用的实例上进行心跳" #HeartbeatOnDisabledIns
400142 = "心跳超限, 实例仅支持每秒1次心跳" #HeartbeatExceedLimit
400143 = "未找到心跳类型" #HeartbeatTypeNotFound
400150 = "元数据长度过长或包含非法字符" #InvalidMetadata
400151 = "限频ID非法" #InvalidRateLimitID
400152 = "限频标签非法" #InvalidRateLimitLabels
400153 = "限频数量非法" #InvalidRateLimitAmounts
400154 = "限流名称非法" #InvalidRateLimitName
400160 = "熔断ID非法" #InvalidCircuitBreakerID
400161 = "熔断版本非法" #InvalidCircuitBreakerVersion
400162 = "熔断名称非法" #InvalidCircuitBreakerName
400163 = "熔断命名空间ID非法" #InvalidCircuitBreakerNamespace
400164 = "熔断所属人ID非法" #InvalidCircuitBreakerOwners
400165 = "熔断token非法" #InvalidCircuitBreakerToken
400166 = "熔断所属业务非法" #InvalidCircuitBreakerBusiness
400167 = "熔断所属部门非法" #InvalidCircuitBreakerDepartment
400168 = "熔断备注非法" #InvalidCircuitBreakerComment
400170 = "服务有已存在的网格" #ServicesExistedMesh
400171 = "当前资源有已存在的网格" #ResourcesExistedMesh
400172 = "网格参数非法" #InvalidMeshParameter
400180 = "平台ID非法" #InvalidPlatformID
400181 = "平台名称非法" #InvalidPlatformName
400182 = "平台域名非法" #InvalidPlatformDomain
400183 = "平台qps非法" #InvalidPlatformQPS
400184 = "平台token非法" #InvalidPlatformToken
400185 = "平台拥有人非法" #InvalidPlatformOwner
400186 = "平台所属部们非法" #InvalidPlatformDepartment
400187 = "平台备注非法" #InvalidPlatformComment
400188 = "未找到平台" #NotFoundPlatform
400190 = "限流ID非法" #InvalidFluxRateLimitId
400191 = "限流qps非法" #InvalidFluxRateLimitQps
400192 = "限流标识非法" #InvalidFluxRateLimitSetKey
400201 = "资源已存在" #ExistedResource
400202 = "未找到资源" #NotFoundResource
400203 = "当前命名空间存在服务,请先删除服务,再删除命名空间" #NamespaceExistedServices
400204 = "当前服务存在实例,请先删除实例,再删除服务" #ServiceExistedInstances
400205 = "当前服务存在路由规则,请先删除路由规则,再删除服务" #ServiceExistedRoutings
400206 = "当前服务存在限流规则,请先删除限流规则,再删除服务" #ServiceExistedRateLimits
400207 = "存在已发布配置" #ExistReleasedConfig
400208 = "实例请求重复" #SameInstanceRequest
400209 = "当前服务存在熔断规则,请先删除熔断规则,再删除服务" #ServiceExistedCircuitBreakers
400210 = "当前服务存在服务别名,请先删除服务别名,再删除服务" #ServiceExistedAlias
400211 = "某些网格资源在当前命名空间已存在" #NamespaceExistedMeshResources
400212 = "某些熔断在当前命名空间已存在" #NamespaceExistedCircuitBreakers
400213 = "服务已被某些网格订阅" #ServiceSubscribedByMeshes
400214 = "服务已存在限流配置" #ServiceExistedFluxRateLimits
400215 = "用户已存在" #UserExisted
400216 = "用户组已存在" #UserGroupExisted
400217 = "鉴权策略规则已存在" #AuthStrategyRuleExisted
400218 = "某些子账号已属当前拥有人" #SubAccountExisted
400301 = "服务未找到" #NotFoundService
400302 = "路由未找到" #NotFoundRouting
400303 = "示例未找到" #NotFoundInstance
400304 = "服务别名未找到" #NotFoundServiceAlias
400305 = "命名空间未找到" #NotFoundNamespace
400306 = "未找到和当前服务别名关联的服务" #NotFoundSourceService
400307 = "限流规则未找到" #NotFoundRateLimit
400308 = "熔断规则未找到" #NotFoundCircuitBreaker
400309 = "主配置未找到" #NotFoundMasterConfig
400310 = "标签配置未找到" #NotFoundTagConfig
400311 = "未找到标签或服务, 或者关系已存在" #NotFoundTagConfigOrService
400312 = "用户未找到" #NotFoundUser
400313 = "拥有人用户未找到" #NotFoundOwnerUser
400314 = "用户组未找到" #NotFoundUserGroup
400315 = "鉴权策略规则未找到" #NotFoundAuthStrategyRule
400401 = "客户端API未开放" #ClientAPINotOpen
400402 = "不允许请求当前业务服务" #NotAllowBusinessService
400410 = "用户所有人非法" #InvalidUserOwners
400411 = "用户ID非法" #InvalidUserID
400412 = "用户密码非法" #InvalidUserPassword
400413 = "用户手机号非法" #InvalidUserMobile
400414 = "用户邮件非法" #InvalidUserEmail
400420 = "用户组所有人的属性非法" #InvalidUserGroupOwners
400421 = "用户组ID非法" #InvalidUserGroupID
400430 = "鉴权策略规则拥有人非法" #InvalidAuthStrategyOwners
400431 = "鉴权策略规则名称非法" #InvalidAuthStrategyName
400432 = "鉴权策略ID非法" #InvalidAuthStrategyID
400440 = "鉴权策略用户主体类型非法" #InvalidPrincipalType
400501 = "服务别名不允许更新" #NotAllowAliasUpdate
400502 = "服务别名不允许创建实例" #NotAllowAliasCreateInstance
400503 = "服务别名不允许创建路由规则" #NotAllowAliasCreateRouting
400504 = "仅允许源服务可以创建别名" #NotAllowCreateAliasForAlias
400505 = "服务别名不允许创建限流规则" #NotAllowAliasCreateRateLimit
400506 = "服务别名不允许绑定规则" #NotAllowAliasBindRule
400507 = "不允许不同的命名空间绑定同一规则" #NotAllowDifferentNamespaceBindRule
400508 = "不允许修改默认策略" #NotAllowModifyDefaultStrategyPrincipal
400801 = "配置文件组名非法" #InvalidConfigFileGroupName
400802 = "配置文件名称非法" #InvalidConfigFileName
400803 = "配置文件内容过长" #InvalidConfigFileContentLength
400804 = "非法的配置文件格式,支持的格式有: json,xml,html,properties,text,yaml" #InvalidConfigFileFormat
400805 = "配置文件标签非法, 标签应该是成对的, 比如key1,value1,key2,value2, 并且key,value应是非空白字符" #InvalidConfigFileTags
400806 = "监视配置文件格式非法" #InvalidWatchConfigFileFormat
400807 = "无法找到配置文件" #NotFoundResourceConfigFile
400808 = "配置模板名称非法" #InvalidConfigFileTemplateName
401000 = "未经授权" #Unauthorized
401001 = "权限不被允许" #NotAllowedAccess
401002 = "鉴权token为空" #EmptyAutToken
401003 = "token已被禁用" #TokenDisabled
401004 = "token不存在" #TokenNotExisted
403001 = "ip达到服务端限制" #IPRateLimit
403002 = "api达到服务端限制" #APIRateLimit
404001 = "无法找到主机的cmdb" #CMDBNotFindHost
409000 = "数据有冲突, 请再次重试" #DataConflict
429001 = "你的实例请求过多" #InstanceTooManyRequests
500000 = "执行异常" #ExecuteException
500001 = "存储层异常" #StoreLayerException
500002 = "cmdb插件异常" #CMDBPluginException
500004 = "解析路由规则失败" #ParseRoutingException
500005 = "解析限频规则失败" #ParseRateLimitException
500006 = "解析熔断规则失败" #ParseCircuitBreakerException
500007 = "心跳异常" #HeartbeatException
500008 = "实例异步注册超时" #InstanceRegisTimeout
500100 = "token验证异常" #AuthTokenVerifyException
500101 = "角色操作异常" #OperationRoleException
Loading

0 comments on commit 168376b

Please sign in to comment.