social work error handling added