LogicException : The controller must return a response (success ! given) i have a service that return for me true in the node (article) successfully create and false if something wrong ,  but in the controller i am getting this error 'LogicException : The controller must return a response (success ! given). dans Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw() (ligne 169 de /var/www/html/vendor/symfony/http-kernel/HttpKernel.php).'
can anyone tell me where is the problem in the controller return of my code please ?

service

 public function createArticle()
  {
    $node = Node::create(array(
      'type' =&gt; 'article custom',
      'title' =&gt; 'article custom',
      'langcode' =&gt; 'fr',
      'uid' =&gt; '1',
      'status' =&gt; 1,
      'field_fields' =&gt; array(),
    ));
    $node-&gt;save();
    if($node)
      return true;
    else
      return false;
  }


the controller methode

 public function myPageCreate()
  {
    $service = \Drupal::service('mymodule.ran');
    $createnode = $service-&gt;createArticle();
    if($createnode)
      return 'success !';
    else
      return 'somthing wrong !';
  }
A controller must provide a response, but drupal has extended the response handling to look for render arrays, that are then used the generate a response with the rendered html. If you don't provide a render array, then there is no response and then this error message will come up.