resolve waiting for error