@@ -27,6 +27,7 @@ const (
27
27
const (
28
28
ErrInvalidParams int32 = 400001
29
29
ErrUnhealthy int32 = 400002
30
+ ErrUnregistryedEnv int32 = 400004
30
31
ErrServiceAlreadyExists int32 = 400010
31
32
ErrServiceNotExists int32 = 400012
32
33
ErrDeployedInstance int32 = 400013
@@ -55,29 +56,31 @@ const (
55
56
)
56
57
57
58
var errorsMap = map [int32 ]string {
58
- ErrInvalidParams : "Invalid parameter(s)" ,
59
- ErrUnhealthy : "Server is Unhealthy" ,
60
- ErrServiceAlreadyExists : "Micro-service already exists" ,
61
- ErrServiceNotExists : "Micro-service does not exist" ,
62
- ErrServiceVersionNotExists : "Micro-service version does not exist" ,
63
- ErrDeployedInstance : "Micro-service has deployed instance(s)" ,
64
- ErrDependedOnConsumer : "Consumer(s) depends on this micro-service" ,
65
- ErrUndefinedSchemaID : "Undefined schema id" ,
66
- ErrModifySchemaNotAllow : "Not allowed to modify schema" ,
67
- ErrSchemaNotExists : "Schema does not exist" ,
68
- ErrInstanceNotExists : "Instance does not exist" ,
69
- ErrPermissionDeny : "Access micro-service refused" ,
70
- ErrTagNotExists : "Tag does not exist" ,
71
- ErrRuleAlreadyExists : "Rule already exist" ,
72
- ErrBlackAndWhiteRule : "Can not have both 'BLACK' and 'WHITE'" ,
73
- ErrModifyRuleNotAllow : "Not allowed to modify the type of the rule" ,
74
- ErrRuleNotExists : "Rule does not exist" ,
75
- ErrNotEnoughQuota : "Not enough quota" ,
76
- ErrInternal : "Internal server error" ,
77
- ErrUnavailableBackend : "Registry service is unavailable" ,
78
- ErrUnavailableQuota : "Quota service is unavailable" ,
79
- ErrEndpointAlreadyExists : "Endpoint is already belong to other service" ,
80
- ErrForbidden : "Forbidden" ,
59
+ ErrInvalidParams : "Invalid parameter(s)" ,
60
+ ErrUnhealthy : "Server is Unhealthy" ,
61
+ ErrServiceAlreadyExists : "Micro-service already exists" ,
62
+ ErrServiceNotExists : "Micro-service does not exist" ,
63
+ ErrServiceVersionNotExists : "Micro-service version does not exist" ,
64
+ ErrDeployedInstance : "Micro-service has deployed instance(s)" ,
65
+ ErrDependedOnConsumer : "Consumer(s) depends on this micro-service" ,
66
+ ErrUndefinedSchemaID : "Undefined schema id" ,
67
+ ErrModifySchemaNotAllow : "Not allowed to modify schema" ,
68
+ ErrSchemaNotExists : "Schema does not exist" ,
69
+ ErrInstanceNotExists : "Instance does not exist" ,
70
+ ErrPermissionDeny : "Access micro-service refused" ,
71
+ ErrTagNotExists : "Tag does not exist" ,
72
+ ErrRuleAlreadyExists : "Rule already exist" ,
73
+ ErrBlackAndWhiteRule : "Can not have both 'BLACK' and 'WHITE'" ,
74
+ ErrModifyRuleNotAllow : "Not allowed to modify the type of the rule" ,
75
+ ErrRuleNotExists : "Rule does not exist" ,
76
+ ErrNotEnoughQuota : "Not enough quota" ,
77
+ ErrInternal : "Internal server error" ,
78
+ ErrUnavailableBackend : "Registry service is unavailable" ,
79
+ ErrUnavailableQuota : "Quota service is unavailable" ,
80
+ ErrEndpointAlreadyExists : "Endpoint is already belong to other service" ,
81
+ ErrForbidden : "Forbidden" ,
82
+ ErrUnregistryedEnv : "Env has services" ,
83
+ ErrEnvironmentAlreadyExists : "EnvId already exist" ,
81
84
}
82
85
83
86
var errManager = errsvc .NewManager ()
0 commit comments