Remove outdated test files and update peer registration logic

This commit is contained in:
netkas 2024-12-23 19:25:21 -05:00
parent 1108711eb7
commit 7e4b02bc04
18 changed files with 362 additions and 819 deletions

View file

@ -113,20 +113,26 @@
if($response === false)
{
curl_close($ch);
throw new RpcException('Failed to create the session, no response received');
throw new RpcException(sprintf('Failed to create the session at %s, no response received', $this->rpcEndpoint));
}
$responseCode = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if($responseCode !== 201)
{
curl_close($ch);
throw new RpcException('Failed to create the session, server responded with ' . $responseCode . ': ' . $response);
if(empty($response))
{
throw new RpcException(sprintf('Failed to create the session at %s, server responded with ' . $responseCode, $this->rpcEndpoint));
}
throw new RpcException(sprintf('Failed to create the session at %s, server responded with ' . $responseCode . ': ' . $response, $this->rpcEndpoint));
}
if(empty($response))
{
curl_close($ch);
throw new RpcException('Failed to create the session, server did not return a session UUID');
throw new RpcException(sprintf('Failed to create the session at %s, server did not return a session UUID', $this->rpcEndpoint));
}
curl_close($ch);