The below function does not work with Oxwall 1.5 but it worked in 1.4 version.
OW::getRouter()->removeRoute('base_page_404');
I have posted it before and I don't mind posting the same topic again in
multiple posts in the hope that it would be at-least seen by Oxwall
team.