# wordpress-seo/27.8/src/ai-http-request/domain/exceptions/remote-request-exception.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 27.8. 43 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/27.8/code/src/ai-http-request/domain/exceptions/remote-request-exception.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/27.8/raw/src/ai-http-request/domain/exceptions/remote-request-exception.php
- Modified: 2026-01-20T12:23:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/27.8/code/src/ai-http-request/domain/exceptions/remote-request-exception.php#L10-L20`.

```php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\AI_HTTP_Request\Domain\Exceptions;

use Exception;
use Throwable;

/**
 * Class Remote_Request_Exception
 */
abstract class Remote_Request_Exception extends Exception {

	/**
	 * A string error code that can be used to identify a particular type of error.
	 *
	 * @var string
	 */
	private $error_identifier;

	/**
	 * Constructor.
	 *
	 * @param string         $message          The error message.
	 * @param int            $code             The error status code.
	 * @param string         $error_identifier The error code identifier, used to identify a type of error.
	 * @param Throwable|null $previous         The previously thrown exception.
	 */
	public function __construct( $message = '', $code = 0, $error_identifier = '', ?Throwable $previous = null ) {
		parent::__construct( $message, $code, $previous );
		$this->error_identifier = (string) $error_identifier;
	}

	/**
	 * Returns the error identifier.
	 *
	 * @return string The error identifier.
	 */
	public function get_error_identifier(): string {
		return $this->error_identifier;
	}
}

```
