getRecordService()->convert($data['id']); if (!empty($entity)) { return $entity->toArray(); } throw new Error(); } }