diff --git a/internal/errors/code.go b/internal/errors/code.go index f0aee9d743..bf7f53a511 100644 --- a/internal/errors/code.go +++ b/internal/errors/code.go @@ -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. diff --git a/internal/errors/code_test.go b/internal/errors/code_test.go index e2d40471ff..3c3e75f368 100644 --- a/internal/errors/code_test.go +++ b/internal/errors/code_test.go @@ -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) { diff --git a/internal/errors/info.go b/internal/errors/info.go index e24b6d0cf9..b5f7bab95b 100644 --- a/internal/errors/info.go +++ b/internal/errors/info.go @@ -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,