I have tried mapping a custom error page in SharePoint using both feature activation code and the PoSh cmdlet set-SPCustomLayoutsPage, but SharePoint does not want to use my page for some reason.
When I use the cmdlet get-SPCustomLayoutsPage I get the Error page relative path that I am expecting (ie my custom page: /_layouts/15/CustomError.aspx). I can manually navigate to the error page successfully too. But when I raise an error, the default error page is shown.
I followed this example for 2010, along with other similar posts, and this has apparently not changed. There are however a number of references to the new way of doing things for Publishing sites, but I am using a Team Site.
This is suppose to be a trivial task. Any guidance or input would be appreciated.