Return the unavailable error to make the client's retry policy take effect (#17719)

Signed-off-by: SimFG <bang.fu@zilliz.com>
pull/17755/head
SimFG 2022-06-22 21:56:13 +08:00 committed by GitHub
parent 6cb00aa5bb
commit 3fadf4c5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,9 @@ import (
"errors"
"fmt"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"github.com/milvus-io/milvus/internal/proto/schemapb"
)
@ -81,5 +84,5 @@ func ErrUnauthenticated() error {
}
func ErrProxyNotReady() error {
return fmt.Errorf("internal: Milvus Proxy is not ready yet. please wait")
return status.Errorf(codes.Unavailable, "internal: Milvus Proxy is not ready yet. please wait")
}