add ErrorController and related test