The snipped code for 'Sending downlink using dashboards' does not work

The snipped code for 'Sending downlink using dashboards' does not work

Hi all.

I got a problem with the code provided by Tago for 'sending downlinks from a dashboards'.
First of all I have not changed anything from the code. I have added Environment Variables 'default_PORT'

The error that I receive is
Downlink failed with status 500: {"message":"Cannot read properties of undefined (reading 'status')"}'