router: fix error when responding to non-existent resource