@tgsnake/core
Version:
Pure Telegram MTProto library for nodejs
31 lines (30 loc) • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProxyUnsupported = exports.ReadClosed = exports.Disconnected = exports.WebSocketError = void 0;
const Base_js_1 = require("./Base.js");
class WebSocketError extends Base_js_1.BaseError {
constructor(message, description) {
super();
this.message = message;
this.description = description;
}
}
exports.WebSocketError = WebSocketError;
class Disconnected extends WebSocketError {
constructor() {
super('WebSocket Disconnected', "This happen when you trying to send request or receive update from websocket server hut the websocket client is doesn't ready. Make sure the websocket client is connected to server.");
}
}
exports.Disconnected = Disconnected;
class ReadClosed extends WebSocketError {
constructor() {
super('WebSocket connection closed when reading data', 'This happen when suddenly the connection between the websocket client and the server is lost when fetching data updates from the server.');
}
}
exports.ReadClosed = ReadClosed;
class ProxyUnsupported extends WebSocketError {
constructor() {
super('WebSocket proxy unsupported', 'This is because browser telegram or websocket proxy are not supported by the framework at this time.');
}
}
exports.ProxyUnsupported = ProxyUnsupported;