# wordpress-seo/trunk/src/dashboard/domain/analytics-4/invalid-request-exception.php

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

- Page: https://pluginprobe.com/plugins/wordpress-seo/trunk/code/src/dashboard/domain/analytics-4/invalid-request-exception.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/trunk/raw/src/dashboard/domain/analytics-4/invalid-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/trunk/code/src/dashboard/domain/analytics-4/invalid-request-exception.php#L10-L20`.

```php
<?php

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

use Exception;

/**
 * Exception for when an Analytics 4 request is invalid.
 */
class Invalid_Request_Exception extends Exception {

	/**
	 * Constructor of the exception.
	 *
	 * @param string $error_message The error message of the request.
	 */
	public function __construct( $error_message ) {
		parent::__construct( 'The Analytics 4 request is invalid: ' . $error_message, 400 );
	}
}

```
