initial HTTP error handling