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