Everytime the http.onrequest() callback is invoked, a call to httpresponse.send() should be made. It is considered best practice to wrap your onrequest callback in a try catch (and send a response if an error occurs).