Fixes to hook script

I fixed one of the URLs and also made requests complain if it gets a 4xx or 5xx back from GitHub so that error messages are clearer because we don't expect that to happen when running this script.

Test Plan: Ran it successfully.

Auditors: csilvers