iflytek/astron-agent · error · BusinessException
8303
8303
Error message
toolbox.not.exist
What it means
TOOLBOX_NOT_EXIST (code 8303) is thrown when a query by toolId finds no non-deleted ToolBox rows. The service logs the toolId and aborts because subsequent permission checks and mapping need at least one record. Soft-deleted tools (deleted=true) also count as non-existent.
Solutions
- Verify the toolId exists and is not soft-deleted (deleted=false) in the tool_box table
- Refresh the client's tool list and use a currently valid toolId
- Check you are pointed at the correct environment/database for that toolId
Defensive patterns
Strategy: try-catch
Validate before calling
// precondition check
ToolBox t = toolBoxApi.findById(toolId); if (t == null || t.isDeleted()) { /* abort before calling */ } Try / catch
try { toolBoxApi.get(toolId); } catch (BusinessException e) { if (e.getCode() == 8303) { /* refresh tool list / show 'tool no longer exists' */ } else throw e; } Prevention
- Refresh cached tool IDs after delete operations
- Confirm toolId against the environment you are calling
- Handle soft-delete semantics (deleted=false) in client-side lookups
When it happens
Trigger: Calling a ToolBoxService API (get/export/update) with a toolId that has no row, was soft-deleted, or belongs to a different tenant and thus is invisible.
Common situations: Stale toolId cached in the frontend after the tool was deleted; typos or wrong-environment IDs (test vs prod database); using a tool ID from another space/user.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/897a1a2df8b41b68.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/tool/ToolBoxService.java:2130
}
schema.setProperties(propertyMap);
schema.setType(OpenApiConst.SCHEMA_TYPE_OBJECT);
mediaType.setSchema(schema);
Map<String, MediaType> content = new HashMap<>();
content.put(org.springframework.http.MediaType.APPLICATION_JSON_VALUE, mediaType);
return content;
}
public List<ToolBoxVo> getToolVersion(String toolId) {
List<ToolBox> toolBoxes = toolBoxMapper.selectList(
Wrappers.<ToolBox>lambdaQuery()
.eq(ToolBox::getToolId, toolId)
.eq(ToolBox::getDeleted, false)
.orderByDesc(ToolBox::getCreateTime));
if (CollectionUtils.isEmpty(toolBoxes)) {
log.error("tool not exist, toolId={}", toolId);
throw new BusinessException(ResponseEnum.TOOLBOX_NOT_EXIST);
}
ToolBox toolBox = toolBoxes.get(0);
boolean flag = toolBox.getIsPublic() || bizConfig.getAdminUid().toString().equals(toolBox.getUserId());
if (flag) {
// Official tools
return toolBoxes.stream().map(toolBoxItem -> {
ToolBoxVo toolBoxVo = new ToolBoxVo();
BeanUtils.copyProperties(toolBoxItem, toolBoxVo);
toolBoxVo.setWebSchema(filterDisPlaySchema(toolBoxItem.getWebSchema()));
toolBoxVo.setSchema(StringUtils.EMPTY);
toolBoxVo.setAuthInfo(StringUtils.EMPTY);
toolBoxVo.setAddress(s3UtilClient.getS3Prefix());
return toolBoxVo;
}).collect(Collectors.toList());
} else {
Long spaceId = SpaceInfoUtil.getSpaceId();
if (spaceId != null) {
if (spaceId.equals(toolBox.getSpaceId())) {View on GitHub (pinned to 5e758547a8)