Handle network errors