begin http error handling