From 0e37d0aa058dcccb0d2f940a6697177f336d73fa Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Fri, 26 Sep 2025 13:21:06 +0200 Subject: [PATCH] More robust ping --- client/spaces/http_space_primitives.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/spaces/http_space_primitives.ts b/client/spaces/http_space_primitives.ts index 7f36ee58..578ed2fb 100644 --- a/client/spaces/http_space_primitives.ts +++ b/client/spaces/http_space_primitives.ts @@ -251,6 +251,10 @@ export class HttpSpacePrimitives implements SpacePrimitives { }, }, pingTimeout); + if (!resp.ok) { + throw new Error(`Ping failed: ${resp.status} ${resp.statusText}`); + } + await this.validateSpacePathFromHeaders(resp); // Consume the response body to avoid leaks