Close window during error on http get