From bef9bb59e3fcee3d752ce8f949b851169f11b5ea Mon Sep 17 00:00:00 2001 From: Justin LeBlanc Date: Tue, 5 Aug 2025 17:04:32 +0100 Subject: [PATCH] Fix status check in the 'connect()' function --- src/Urbit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index c609182..66c1288 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -271,7 +271,7 @@ export class Urbit { if (this.verbose) { console.log('Received authentication response', response); } - if (response.status >= 200 && response.status < 300) { + if (response.status < 200 && response.status >= 300) { throw new Error('Login failed with status ' + response.status); } const cookie = response.headers.get('set-cookie');