Updated code to handle blank familyId to show error in response.