feat (errors): add WorkerFoundForRequest error code
This commit is contained in:
1 parent
6f78889947
commit
6cc984e4e4
3 files changed
+11
No files matched your search
@@ -63,6 +63,8 @@ const (
|
||||
StorageContainerReadOnly = 131 // StorageContainerReadOnly represents an error when a container is readonly and a write operation is attempted on it
|
||||
StorageContainerWriteOnly = 132 // StorageContainerWriteOnly represents an error when a container is write only and a read operation is attempted on it
|
||||
|
||||
WorkerNotFoundForRequest = 133 // WorkerNotFoundForRequest represents an error when no appropriate worker is found which meets the conditions required to handle a request
|
||||
|
||||
AuthAttemptExpired Code = 198 // AuthAttemptExpired represents an expired authentication attempt
|
||||
AuthMethodInactive Code = 199 // AuthMethodInactive represents an error that means the auth method is not active.
|
||||
|
||||
|
||||
@@ -390,6 +390,11 @@ func TestCode_Both_String_Info(t *testing.T) {
|
||||
c: StorageContainerWriteOnly,
|
||||
want: StorageContainerWriteOnly,
|
||||
},
|
||||
{
|
||||
name: "WorkerNotFoundForRequest",
|
||||
c: WorkerNotFoundForRequest,
|
||||
want: WorkerNotFoundForRequest,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
@@ -287,6 +287,10 @@ var errorCodeInfo = map[Code]Info{
|
||||
Message: "unsupported operation for a kms worker",
|
||||
Kind: State,
|
||||
},
|
||||
WorkerNotFoundForRequest: {
|
||||
Message: "worker not found with all conditions required for request",
|
||||
Kind: State,
|
||||
},
|
||||
QueueIsFull: {
|
||||
Message: "queue is full",
|
||||
Kind: State,
|
||||
|
||||
Reference in new issue
Block a user