More robust ping

This commit is contained in:
Zef Hemel
2025-09-26 13:21:06 +02:00
parent eec54fdb93
commit 0e37d0aa05
+4
View File
@@ -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