Skip to content

Commit 564d43d

Browse files
Merge pull request #2431 from tychota/fix/grpc-credentials-client
Fix "Channel options must be an object with (...) string values"
2 parents 41dae58 + 44126e9 commit 564d43d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/microservices/client/client-grpc.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
6565
if (!this.grpcClient[name]) {
6666
throw new InvalidGrpcServiceException();
6767
}
68+
const credentials =
69+
options.credentials || grpcPackage.credentials.createInsecure();
70+
delete options.credentials;
6871
const grpcClient = new this.grpcClient[name](
6972
this.url,
70-
options.credentials || grpcPackage.credentials.createInsecure(),
73+
credentials,
7174
options,
7275
);
7376
const protoMethods = Object.keys(this.grpcClient[name].prototype);

0 commit comments

Comments
 (0)