When sending a request like this:
the api method
Actions.getPageUrl currently might return a completely empty datatable, if the url can't be found. But the RSS renderer tries to use the
period metadata of the datatable, which does not exist, and fails.
Simply returning the first subtables metadata for the empty table response solves that issue.
It's a bit clearer, but I'm still unsure as to whether the period we pick in the list of tables will be what is expected by callers. I also noticed that this code doesn't appear to be tested (there don't seem to be any tests that call getPageUrl/getOutlink/etc.). Do you think it would be a good idea to add an integration or system test to cover this behavior and maybe check the period that is returned? If it's there isn't one already, perhaps there could be a rss test for this as well?
@sgiehl is there a test that requests a page URL that cannot be found (to trigger the bug this PR fixes)?
@diosmosis I've just added a test that should throw an exception on 4.x-dev