Hi,
This is a code issue 100%, I am not sure which team sends the query but this needs to be addressed. I think it would also help debug/fix the issue with the random failure of get_host_hooks which was already reported and communicated on in the list.
Can someone from infra/network please look at the query and see what is the cause of the NPE?
Thanks,
Dafna