• File: failed-request-exception.php
  • Full Path: /home/docteuh/www/tinymce/search-console/failed-request-exception.php
  • Date Modified: 06/23/2026 4:19 PM
  • File size: 661 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

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

use Exception;

/**
 * Exception for when a search console request fails.
 */
class Failed_Request_Exception extends Exception {

	/**
	 * Constructor of the exception.
	 *
	 * @param string $error_message     The error message of the request.
	 * @param int    $error_status_code The error status code of the request.
	 */
	public function __construct( $error_message, $error_status_code ) {
		parent::__construct( 'The Search Console request failed: ' . $error_message, $error_status_code );
	}
}