use toError in toArray

now that toError changes are in, the fix for bad field selection can use toError as well