@nestjs/websockets
Advanced tools
Comparing version 6.4.1 to 6.5.0
@@ -6,2 +6,4 @@ export declare class WsException extends Error { | ||
getError(): string | object; | ||
toString(): string; | ||
private getErrorString; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); | ||
class WsException extends Error { | ||
@@ -12,3 +13,10 @@ constructor(error) { | ||
} | ||
toString() { | ||
const message = this.getErrorString(this.message); | ||
return `Error: ${message}`; | ||
} | ||
getErrorString(target) { | ||
return shared_utils_1.isString(target) ? target : JSON.stringify(target); | ||
} | ||
} | ||
exports.WsException = WsException; |
{ | ||
"name": "@nestjs/websockets", | ||
"version": "6.4.1", | ||
"version": "6.5.0", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@websockets)", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec", |
@@ -18,3 +18,2 @@ <p align="center"> | ||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a> | ||
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a> | ||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a> | ||
@@ -21,0 +20,0 @@ <a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> |
57690
907
92