iflytek/astron-agent · warning · BusinessException

INVITE_RECORD_NOT_FOUND

INVITE_RECORD_NOT_FOUND

Error message

INVITE_RECORD_NOT_FOUND

What it means

INVITE_RECORD_NOT_FOUND is thrown by InviteRecordBizServiceImpl.getRecordByParam when the decrypted invitation id does not match any row via inviteRecordService.selectVOById(id). The decryption succeeded but the underlying invitation record no longer exists (or is filtered out by the VO query, e.g. deleted/expired rows).

Solutions

  1. Check the invite_record table for a row with the decrypted id and confirm it is not soft-deleted or filtered by selectVOById conditions
  2. Regenerate the invitation and send a fresh link
  3. Client-side: detect this code and render an 'invitation expired/invalid' page with a path to request a new invite
  4. If invitations should remain resolvable after acceptance, verify the acceptance flow archives rather than deletes records
Defensive patterns

Strategy: try-catch

Validate before calling

// server-side pre-check
Long id = decryptInviteParam(param);
if (id != null && inviteRecordService.getById(id) == null) {
    // show 'invitation no longer valid' without hitting getRecordByParam
}

Try / catch

try {
    InviteRecordVO vo = inviteRecordBizService.getRecordByParam(param);
} catch (BusinessException e) {
    if (ResponseEnum.INVITE_RECORD_NOT_FOUND.getCode().equals(e.getCode())) {
        return renderInvitationExpiredPage();
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling getRecordByParam with an encrypted param whose id was deleted from the invite record table, an id from another environment/database, or an id filtered by the selectVOById conditions (status/deleted flag).

Common situations: Stale invitation links kept in chat history after the invitation was revoked or the records table cleaned up; cross-environment links; expired invitations purged by a retention job.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/66e20c7d451a0d37. Report an issue: GitHub.

Appendix: source

Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/space/impl/InviteRecordBizServiceImpl.java:407

     * Get invitation record by parameter
     *
     * @param param Invitation record ID AES encrypted
     * @return
     */
    @Override
    public InviteRecordVO getRecordByParam(String param) {
        long id = 0;
        try {
            String decrypt = AESUtil.decrypt(param, AES_KEY);
            assert decrypt != null;
            id = Long.parseLong(decrypt);
        } catch (Exception e) {
            log.error("Failed to parse invitation parameters", e);
            throw new BusinessException(ResponseEnum.INVITE_PARAMETER_EXCEPTION);
        }
        InviteRecordVO vo = inviteRecordService.selectVOById(id);
        if (vo == null) {
            throw new BusinessException(ResponseEnum.INVITE_RECORD_NOT_FOUND);
        }
        UserInfo inviterUser = userInfoDataService.findByUid(vo.getInviterUid()).orElseThrow();
        vo.setInviterName(inviterUser.getNickname());
        vo.setInviterAvatar(inviterUser.getAvatar());
        if (Objects.equals(InviteRecordTypeEnum.SPACE.getCode(), vo.getType())) {
            SpaceUser spaceOwner = spaceUserService.getSpaceOwner(vo.getSpaceId());
            if (spaceOwner != null) {
                UserInfo ownerUser = userInfoDataService.findByUid(spaceOwner.getUid()).orElseThrow();
                vo.setOwnerName(ownerUser.getNickname());
                vo.setOwnerAvatar(ownerUser.getAvatar());
            }
            Space space = spaceService.getSpaceById(vo.getSpaceId());
            if (space != null) {
                vo.setSpaceName(space.getName());
                vo.setSpaceAvatar(space.getAvatarUrl());
                vo.setSpaceDescription(space.getDescription());
                vo.setIsBelong(spaceUserService.getSpaceUserByUid(vo.getSpaceId(), vo.getInviteeUid()) != null);
            } else {

View on GitHub (pinned to 5e758547a8)