Consider subtypes in exception error page mapping

Fixes gh-417