updated Rest exception handling