full JSON and error page integration complete