iflytek/astron-agent · warning

Update market record publish channel failed, record not…

Error message

Update market record publish channel failed, record not found: botId={}, uid={}, spaceId={}

What it means

A warn log when updating the market record's publish channels matches 0 rows, meaning no market record exists for that botId/uid/spaceId. The update is silently skipped; exceptions are also swallowed.

Solutions

  1. Ensure the bot has a market record (publish once) before updating channels
  2. Insert a market record if missing instead of only updating
  3. Verify botId/uid/spaceId values match the existing chat_bot_market row

Example fix

// before
int updateCount = chatBotMarketMapper.updatePublishStatus(botId, uid, spaceId, null, channels);
// after
int updateCount = chatBotMarketMapper.updatePublishStatus(botId, uid, spaceId, null, channels);
if (updateCount == 0) {
    chatBotMarketMapper.insertMarketRecord(botId, uid, spaceId, channels); // create-if-missing
}
Defensive patterns

Strategy: validation

When it happens

Trigger: updatePublishChannel calls updateMarketRecordChannels before any market row was created (bot never published), or uid/spaceId don't match the stored row.

Common situations: Adding a publish channel for a bot that was never published to the market; space mismatch after bot moved between spaces; stale uid after account changes.

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/c542e52e1a05c1d0. Report an issue: GitHub.

Appendix: source

Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/BotPublishServiceImpl.java:343

    private void createMarketRecordForChannel(Integer botId, String uid, Long spaceId, String channels) {
        // Publish event to create market record - handled by InstructionalBotPublishListener
        eventPublisher.publishEvent(new BotPublishStatusChangedEvent(
                this, botId, uid, spaceId, "PUBLISH",
                null, ShelfStatusEnum.OFF_SHELF.getCode(), channels));
        log.info("Create market record event published: botId={}, uid={}, spaceId={}, channels={}",
                botId, uid, spaceId, channels);
    }

    /**
     * Update market record publish channel
     */
    private void updateMarketRecordChannels(Integer botId, String uid, Long spaceId, String channels) {
        try {
            int updateCount = chatBotMarketMapper.updatePublishStatus(botId, uid, spaceId, null, channels);
            if (updateCount > 0) {
                log.info("Update market record publish channel successfully: botId={}, channels={}", botId, channels);
            } else {
                log.warn("Update market record publish channel failed, record not found: botId={}, uid={}, spaceId={}",
                        botId, uid, spaceId);
            }
        } catch (Exception e) {
            log.error("Update market record publish channel exception: botId={}, uid={}, spaceId={}, channels={}",
                    botId, uid, spaceId, channels, e);
        }
    }

    /**
     * Convert time series data items
     */
    private List<BotTimeSeriesResponseDto.TimeSeriesItem> convertToTimeSeriesItems(
            List<BotTimeSeriesStatsVO> timeSeriesStats, String type) {
        return timeSeriesStats.stream()
                .map(stats -> {
                    Integer count = switch (type) {
                        case "user" -> stats.getUserCount();
                        case "token" -> stats.getTokenCount();

View on GitHub (pinned to 5e758547a8)