ÿØÿà JFIF H H ÿÛ C GIF89;
| System: Linux srv913213 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 Current Path : /var/www/talentgenesis_admin_backend/node_modules/@nestjs/microservices/exceptions/ |
| Current File : /var/www/talentgenesis_admin_backend/node_modules/@nestjs/microservices/exceptions/rpc-exception.js |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RpcException = void 0;
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
/**
* @publicApi
*/
class RpcException extends Error {
constructor(error) {
super();
this.error = error;
this.initMessage();
}
initMessage() {
if ((0, shared_utils_1.isString)(this.error)) {
this.message = this.error;
}
else if ((0, shared_utils_1.isObject)(this.error) &&
(0, shared_utils_1.isString)(this.error.message)) {
this.message = this.error.message;
}
else if (this.constructor) {
this.message = this.constructor.name
.match(/[A-Z][a-z]+|[0-9]+/g)
.join(' ');
}
}
getError() {
return this.error;
}
}
exports.RpcException = RpcException;