Use the 404 settings from the configuration for notFound redirects

I currently write a small restful api for my online portfolio and needed to handle different error response codes.  Watching the source code I found the little helper method notFound(). I am a bit confused that the method is not using the folder specified in the configuration but redirecting to the hardcoded error page.

Is that the expected behavior? A fix would be trivial and would allow to customize the template used.