renamed errorPages to replaceErrorPages