I'm using V3 of the google calendar api to sync with a calendar in a php based application.
I use this code to delete events on the google calendar.
$delJson = json_decode($service->events->delete('primary', $gcal_id), true);
Everything runs smoothly if the google calendar id is found. However, the entire process STOPS and displays a blank page if there is no match found between $gcal_id and an actual google calendar id.
At the very least, I want the process to continue without coming to complete halt. I imagine the code would logically be something like this but I can't find any documentation on it.
$delJson = json_decode($service->events->delete('primary', $gcal_id), true);
if ($response == error) { continue }