exit when statusCode >= 400 for upload