Warning (2) : Attempt to read property "id" on null [in /home/prefj/www/com.prefj/public/src/Controller/LocksmithsController.php, line 25]
Warning (512) : Unable to emit headers. Headers sent in file=/home/prefj/www/com.prefj/public/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /home/prefj/www/com.prefj/public/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71]
Warning (2) : Cannot modify header information - headers already sent by (output started at /home/prefj/www/com.prefj/public/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /home/prefj/www/com.prefj/public/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 164]
Warning (2) : Cannot modify header information - headers already sent by (output started at /home/prefj/www/com.prefj/public/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /home/prefj/www/com.prefj/public/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197]
Error: App\Service\LocksmithService::getByPrefecture(): Argument #1 ($prefectureId) must be of type string, null given, called in /home/prefj/www/com.prefj/public/src/Controller/LocksmithsController.php on line 25

App\Service\LocksmithService::getByPrefecture(): Argument #1 ($prefectureId) must be of type string, null given, called in /home/prefj/www/com.prefj/public/src/Controller/LocksmithsController.php on line 25 📋

TypeError
Error in: APP/Service/LocksmithService.php, line 28
APP/Service/LocksmithService.php at line 28 (edit)
        return $query;
    }
    public function getByPrefecture(string $prefectureId): Query
    {
        $table = TableRegistry::getTableLocator()->get('Locksmiths');
        $query = $table
            ->find()

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