Skip to content

Commit ec93c6d

Browse files
committed
doc
1 parent 7993a99 commit ec93c6d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/capabilities/errors/error_codes.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package errors
22

33
type ErrorCode uint32
44

5-
// Capability error codes. These are largely based on gRPC error codes:
6-
// https://grpc.github.io/grpc/core/md_doc_statuscodes.html. Additional
7-
// custom error codes can be added starting from 100 to avoid collision with
8-
// future gRPC defined codes. 0 (OK) is excluded is it is never a valid code for
9-
// a capability error as capability errors must always represent some failure condition.
5+
// Capability error codes are primarily based on gRPC error codes:
6+
// https://grpc.github.io/grpc/core/md_doc_statuscodes.html
7+
// Custom error codes specific to this project should start from 100 to avoid
8+
// conflicts with future gRPC codes. Note: 0 (OK) is intentionally excluded
9+
// because capability errors must always indicate a failure condition.
1010
const (
1111
// Canceled indicates the operation was canceled (typically by the caller).
1212
Canceled ErrorCode = 1
@@ -122,7 +122,7 @@ const (
122122
// authentication credentials for the operation.
123123
Unauthenticated ErrorCode = 16
124124

125-
// Custom error codes not defined in the gRPC error space below here,
125+
// Custom error codes not defined in the gRPC error space are defined below this point,
126126
// starting at 100 to avoid collision with future gRPC defined codes.
127127

128128
// ConsensusFailed indicates failure to reach consensus

0 commit comments

Comments
 (0)