describe: check error codes

If an error occurs in `reference_foreach_name`, it is not propagated.