diff --git a/core/src/gateway/mod.ts b/core/src/gateway/mod.ts index 0a4c6287..64d7ee05 100644 --- a/core/src/gateway/mod.ts +++ b/core/src/gateway/mod.ts @@ -205,6 +205,10 @@ export class Gateway extends EventEmitter { this.retryCount++; this.reconnect(!this.connectionError); }, 500); + } else { + throw new Error( + `Gateway connection closed with code ${e.code}, retry limit reached(${this.retryCount})`, + ); } break; }