mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
Merge branch 'master' of github.com:PhilipMantrov/nest into PhilipMantrov-master
This commit is contained in:
@@ -46,7 +46,7 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
|
||||
const grpcClient = this.createClientByServiceName(name);
|
||||
const clientRef = this.getClient(name);
|
||||
if (!clientRef) {
|
||||
throw new InvalidGrpcServiceException();
|
||||
throw new InvalidGrpcServiceException(name);
|
||||
}
|
||||
|
||||
const protoMethods = Object.keys(clientRef[name].prototype);
|
||||
@@ -65,7 +65,7 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
|
||||
public createClientByServiceName(name: string) {
|
||||
const clientRef = this.getClient(name);
|
||||
if (!clientRef) {
|
||||
throw new InvalidGrpcServiceException();
|
||||
throw new InvalidGrpcServiceException(name);
|
||||
}
|
||||
|
||||
const channelOptions: ChannelOptions =
|
||||
@@ -270,7 +270,9 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
|
||||
const grpcPkg = this.lookupPackage(grpcContext, packageName);
|
||||
|
||||
if (!grpcPkg) {
|
||||
const invalidPackageError = new InvalidGrpcPackageException();
|
||||
const invalidPackageError = new InvalidGrpcPackageException(
|
||||
packageName,
|
||||
);
|
||||
this.logger.error(
|
||||
invalidPackageError.message,
|
||||
invalidPackageError.stack,
|
||||
@@ -295,7 +297,7 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
|
||||
grpcPackage.loadPackageDefinition(packageDefinition);
|
||||
return packageObject;
|
||||
} catch (err) {
|
||||
const invalidProtoError = new InvalidProtoDefinitionException();
|
||||
const invalidProtoError = new InvalidProtoDefinitionException(err.path);
|
||||
const message =
|
||||
err && err.message ? err.message : invalidProtoError.message;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user