title: Magento call to a member function get() on null
body: <p>I am working on Magento 2.4 on customizing the error provided by error 404 , if anyone has any idea about this :</p>
  <pre><code>Error: Call to a member function get() on null in C:\xampp-clean\htdocs\magento242\vendor\magento\framework\App\Action\Action.php:109 Stack trace: #0 C:\xampp-clean\htdocs\magento242\vendor\magento\framework\App\FrontController.php(186): Magento\Framework\App\Action\Action-&gt;dispatch(Object(Magento\Framework\App\Request\Http)) #1 C:\xampp-clean\htdocs\magento242\vendor\magento\framework\App\FrontController.php(118): Magento\Framework\App\FrontController-&gt;processRequest(Object(Magento\Framework\App\Request\Http), Object(SimplifiedMagento\RequestFlow\Controller\Page\CustomNoRoute\Interceptor))
  </code></pre>
  <p>This is the function (Controller)</p>
  <pre><code>&lt;?php
  namespace SimplifiedMagento\RequestFlow\Controller\Page;
  
  use Magento\Framework\App\Action\Action;
  use Magento\Framework\App\ResponseInterface;
  
  class CustomNoRoute extends Action
  {
  
      public function execute()
      {
          echo &quot;this is our custom 404&quot;;
      }
  }
  </code></pre>
  <p>After changing the code to this</p>
  <pre><code>&lt;?php
  namespace SimplifiedMagento\RequestFlow\Controller\Page;
  
  use Magento\Framework\App\ActionInterface;
  use Magento\Framework\App\ResponseInterface;
  
  class CustomNoRoute implements ActionInterface
  {
  
      public function execute()
      {
          echo &quot;this is our custom 404&quot;;
      }
  }
  </code></pre>
  <p>I am getting this result :</p>
  <pre><code>this is our custom 4041 exception(s):
  Exception #0 (InvalidArgumentException): Invalid return type
  
  Exception #0 (InvalidArgumentException): Invalid return type
  &lt;pre&gt;#1 Magento\Framework\App\Http\Interceptor-&gt;launch() called at [vendor\magento\framework\App\Bootstrap.php:263]
  #2 Magento\Framework\App\Bootstrap-&gt;run() called at [pub\index.php:29]
  &lt;/pre&gt;
  </code></pre>
  <p>So at least it is echoing the result ; but still showing exception error.</p>
  <p>If anyone has an idea?
  thanks in advance</p>