Added get:messages resource and added cutom exception handler for rest api