function Http4xxController::on4xx

Same name in other branches
  1. 9 core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on4xx()
  2. 8.9.x core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on4xx()
  3. 10 core/modules/system/src/Controller/Http4xxController.php \Drupal\system\Controller\Http4xxController::on4xx()

The default 4xx error content.

Return value

array A render array containing the message to display for 4xx errors.

File

core/modules/system/src/Controller/Http4xxController.php, line 18

Class

Http4xxController
Controller for default HTTP 4xx responses.

Namespace

Drupal\system\Controller

Code

public function on4xx() {
    return [
        '#markup' => $this->t('A client error happened'),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.