feature(@nestjs/microservices) grpc improvements (add root), cleanup

This commit is contained in:
Kamil Myśliwiec
2018-05-25 12:44:18 +02:00
parent ae128f6e91
commit 17a609cd9c
31 changed files with 185 additions and 300 deletions

View File

@@ -2,6 +2,6 @@ import { RuntimeException } from '@nestjs/core/errors/exceptions/runtime.excepti
export class InvalidGrpcPackageException extends RuntimeException {
constructor() {
super('Invalid gRPC package (not found)');
super('The invalid gRPC package (package not found)');
}
}

View File

@@ -2,6 +2,6 @@ import { RuntimeException } from '@nestjs/core/errors/exceptions/runtime.excepti
export class InvalidGrpcServiceException extends RuntimeException {
constructor() {
super(`Invalid gRPC service (not found)`);
super(`The invalid gRPC service (service not found)`);
}
}

View File

@@ -2,6 +2,6 @@ import { RuntimeException } from '@nestjs/core/errors/exceptions/runtime.excepti
export class InvalidMessageException extends RuntimeException {
constructor() {
super(`Invalid data or message pattern (undefined/null)`);
super(`The invalid data or message pattern (undefined/null)`);
}
}

View File

@@ -2,6 +2,6 @@ import { RuntimeException } from '@nestjs/core/errors/exceptions/runtime.excepti
export class InvalidProtoDefinitionException extends RuntimeException {
constructor() {
super('Invalid .proto definition (file not found?)');
super('The invalid .proto definition (file not found)');
}
}

View File

@@ -1,11 +1,11 @@
import { Logger } from '@nestjs/common';
import { isEmpty, isObject } from '@nestjs/common/utils/shared.utils';
import { InvalidExceptionFilterException } from '@nestjs/core/errors/exceptions/invalid-exception-filter.exception';
import { messages } from '@nestjs/core/constants';
import { Observable, throwError as _throw } from 'rxjs';
import { RpcException } from './rpc-exception';
import { RpcExceptionFilterMetadata } from '@nestjs/common/interfaces/exceptions';
import { ArgumentsHost } from '@nestjs/common/interfaces/features/arguments-host.interface';
import { isEmpty, isObject } from '@nestjs/common/utils/shared.utils';
import { messages } from '@nestjs/core/constants';
import { InvalidExceptionFilterException } from '@nestjs/core/errors/exceptions/invalid-exception-filter.exception';
import { Observable, throwError as _throw } from 'rxjs';
import { RpcException } from './rpc-exception';
export class RpcExceptionsHandler {
private static readonly logger = new Logger(RpcExceptionsHandler.name);