$label = 'Client error';
$className = ClientException::
class;
} elseif ($level === 5
) { $label = 'Server error';
$className = ServerException::
class;
} else { $label = 'Unsuccessful request';
$className = __CLASS__;
} $uri =
$request->
getUri();
$uri =
static::
obfuscateUri($uri);
// Client Error: `GET /` resulted in a `404 Not Found` response:
// <html> ... (truncated)
$message = \
sprintf( '%s: `%s %s` resulted in a `%s %s` response',
$label,
$request->
getMethod(),
$uri->
__toString(),
$response->
getStatusCode(),
$response->
getReasonPhrase() );