@nestjs/microservices
Version:
Nest - modern, fast, powerful node.js web framework (@microservices)
18 lines (17 loc) • 675 B
JavaScript
import { RuntimeException } from '@nestjs/core/internal';
export class InvalidTcpDataReceptionException extends RuntimeException {
constructor(err) {
const errMsgStr = typeof err === 'string'
? err
: err &&
typeof err === 'object' &&
'message' in err &&
typeof err.message === 'string'
? err.message
: String(err);
const _errMsg = errMsgStr.includes('Corrupted length value')
? `Corrupted length value of the received data supplied in a packet`
: `The invalid received message from tcp server`;
super(_errMsg);
}
}