Debug check to ErrorController, updated test.