Avoid unbound variable and improve error catching in resolver