update rest exception handling