From fd467fbf544647d80e293a2284746e447505025c Mon Sep 17 00:00:00 2001 From: Endel Dreyer Date: Mon, 3 Jun 2024 15:21:53 -0300 Subject: [PATCH] throw the original underlining error instead of 'offline' --- package.json | 2 +- src/HTTP.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d061533..9b505d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "colyseus.js", - "version": "0.15.21", + "version": "0.15.22", "description": "Colyseus Multiplayer SDK for JavaScript/TypeScript", "author": "Endel Dreyer", "license": "MIT", diff --git a/src/HTTP.ts b/src/HTTP.ts index e72f23b..daa75a7 100644 --- a/src/HTTP.ts +++ b/src/HTTP.ts @@ -28,7 +28,7 @@ export class HTTP { const status = e.statusCode; // || -1 const message = e.data?.error || e.statusMessage || e.message; // || "offline" - if (status === undefined && message === undefined) { + if (!status && !message) { throw e; }