add rest controller for errors