Handle HTTP timeouts and other errors