Skip to content

Commit 32fbf4d

Browse files
Merge pull request #6 from tianxiaoliang/main
add error code
2 parents 14041cb + 32ddc7e commit 32fbf4d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

discovery/error.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,38 @@ import (
2222
"fmt"
2323
)
2424

25+
const (
26+
ErrInvalidParams int32 = 400001
27+
ErrUnhealthy int32 = 400002
28+
ErrServiceAlreadyExists int32 = 400010
29+
ErrServiceNotExists int32 = 400012
30+
ErrDeployedInstance int32 = 400013
31+
ErrUndefinedSchemaID int32 = 400014
32+
ErrModifySchemaNotAllow int32 = 400015
33+
ErrSchemaNotExists int32 = 400016
34+
ErrInstanceNotExists int32 = 400017
35+
ErrTagNotExists int32 = 400018
36+
ErrRuleAlreadyExists int32 = 400019
37+
ErrBlackAndWhiteRule int32 = 400020
38+
ErrModifyRuleNotAllow int32 = 400021
39+
ErrRuleNotExists int32 = 400022
40+
ErrDependedOnConsumer int32 = 400023
41+
ErrPermissionDeny int32 = 400024
42+
ErrEndpointAlreadyExists int32 = 400025
43+
ErrServiceVersionNotExists int32 = 400026
44+
ErrNotEnoughQuota int32 = 400100
45+
46+
ErrUnauthorized int32 = 401002
47+
48+
ErrForbidden int32 = 403001
49+
50+
ErrConflictAccount int32 = 409001
51+
52+
ErrInternal int32 = 500003
53+
ErrUnavailableBackend int32 = 500011
54+
ErrUnavailableQuota int32 = 500101
55+
)
56+
2557
var errors = map[int32]string{}
2658

2759
type Error struct {

0 commit comments

Comments
 (0)