That is no doubt because of the .htaccess file in your forum directory. You have friendly URLs enabled so the request is being passed to the forum. The forum then returns its own '404' page. If you remove the .htaccess file and disable friendly URLs then it should revert to your standard error documents.
Admin CP -> Home -> Options -> Search Engine Optimisation (SEO) -> Use Full Friendly URLs