async js makes 3 attempts before giving up on error