fix ErrorController; add JsonResponse class