otherwise I get an error later on if field[11] is empty
I now had the time for a closer look.
I want to add and point out, that you are referring to the error you get in the script of HvdW that he posted some time ago. The script with more robust error handling.
Here is a new Earthquake script with more robust error handling and a new URL.
He called it a NEW script and indeed he made drastic changes, but left my name in top. Unfortunately, this was not accompanied by any explanation. Nor was a reason given for a different URL. At first glance, I noticed that the existence of the alert device was being checked every minute. While that is certainly robust, I found it a bit redundant. Furthermore, I did not understand the reason for the different URL. And since everything was working fine for me, I did not really feel motivated to investigate.
In my script there is no field[11] and no error!

I did not find a reason to make the script more complex as it is functioning well here and as I expect it goes.
Since no further explanation has been given, I do not feel the need to discuss it further here. I simply wanted to showcase my project.
I am still working with my own script. The last one as I have posted earlier.
I am sure HvdW is willing to help you out with the error in his script.