The 'for' key is required for find('children') 📋

InvalidArgumentException
Toggle Vendor Stack Frames
/var/www/html/portal-cake/vendor/cakephp/cakephp/src/ORM/Behavior/TreeBehavior.php Toggle Arguments
        [$for$direct] = [$options['for'], $options['direct']];
        if (empty($for)) {
            throw new InvalidArgumentException("The 'for' key is required for find('children')");
        }
        if ($query->clause('order') === null) {
            $query->order([$left => 'ASC']);

If you want to customize this error message, create templates/Error/error500.php