This line doesn’t make sense - you didn’t define a named matcher @apiPath anywhere in your config, and there’s no regexp matcher anywhere that would give that regexp placeholder a value. Did you omit part of your config? Please post your entire config when asking for help.
As for the errors, you should look at the stdout output from Caddy. It depends on how you’re running Caddy where that would appear. You didn’t completely fill out the thread template, so all I can do is make assumptions. If you’re using Docker, then you could run docker logs caddy; if you installed Caddy using apt and it’s running as a service, then you could run journalctl -u caddy. If you ran it directly with caddy run, then you should see any errors right in your terminal.
Was upgrading Caddy the only thing that changed on your system? If not, check that you have catch_workers_output set to yes in /etc/php/7.3/fpm/pool.d/www.conf (it is disabled by default).