Namespace: BhrSdk\Exceptions
Extends: ServerException
HTTP Status Code: 598
Network read timeout
try {
// API call that might fail with 598 status code
} catch (BhrSdk\Exceptions\NetworkReadTimeoutException $e) {
// Handle the exception
echo $e->getMessage();
// Access additional information
$causes = $e->getPotentialCauses();
$tips = $e->getDebuggingTips();
// Access response data
$responseHeaders = $e->getResponseHeaders();
$responseBody = $e->getResponseBody();
}- Network connection was dropped while waiting for response
- Proxy or firewall issues
- Incomplete data transmission
- Check network stability and firewall settings
- Increase read timeout values in your HTTP client
- Implement automatic retry logic for idempotent operations
- Consider using a more reliable network connection
public function __construct(
string $message,
array $responseHeaders = [],
$responseBody = null
)| Name | Type | Description |
|---|---|---|
$message |
string | The error message |
$responseHeaders |
array | HTTP response headers from the API call |
$responseBody |
mixed | HTTP response body from the API call |
Returns an array of potential causes for this exception.
public function getPotentialCauses(): arrayReturns an array of debugging tips for this exception.
public function getDebuggingTips(): arrayReturns the HTTP response headers from the API call that triggered this exception.
public function getResponseHeaders(): arrayReturns the HTTP response body from the API call that triggered this exception.
public function getResponseBody()