paascloud/paascloud-master · error · UacBizException
UAC10014001
UAC10014001
Error message
UAC10014001
What it means
UAC10014001 is thrown by deleteActionById when no UacAction exists for the given actionId (selectByPrimaryKey returns null). It means the permission record to delete was not found; the message is enriched with the offending actionId.
Solutions
- Confirm the actionId exists (select * from uac_action where id = ?) before deleting
- Refresh the client's permission list and retry with a valid id
- Check you are pointed at the intended database/environment
Example fix
// before
uacActionService.deleteActionById(actionId);
// after
if (uacActionMapper.selectByPrimaryKey(actionId) == null) {
logger.warn("action {} already gone, skipping delete", actionId);
return;
}
uacActionService.deleteActionById(actionId); Defensive patterns
Strategy: validation
Validate before calling
if (uacActionMapper.selectByPrimaryKey(actionId) == null) { skip or warn; } Type guard
null
Try / catch
try { service.deleteActionById(id); } catch (UacBizException e) { if ("UAC10014001".equals(e.getCode())) { refreshList(); } } Prevention
- Refresh lists after concurrent edits
- Confirm environment/db before manual id operations
- Treat not-found on delete as idempotent success where allowed
When it happens
Trigger: deleteActionById(actionId) with an id that is not present in the uac_action table — already deleted, wrong environment DB, or a fabricated id from the client.
Common situations: Stale UI list showing rows deleted by another user; dev/prod database mismatch; client sends hardcoded ids from another tenant.
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 paascloud/paascloud-master@781281a950 (2026-09-10).
Data as JSON: /api/errors/ac4de2e3a4f1cd3f.
Report an issue: GitHub.
Appendix: source
Thrown at paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacActionServiceImpl.java:72
uacAction.setMenuId(menuId);
BeanUtils.copyProperties(actionMainQueryDto, uacAction);
uacAction.setOrderBy("update_time desc");
PageHelper.startPage(actionMainQueryDto.getPageNum(), actionMainQueryDto.getPageSize());
List<ActionVo> actionList = uacActionMapper.queryActionListWithPage(uacAction);
return new PageInfo<>(actionList);
}
@Override
public int deleteActionById(Long actionId) {
//查询该角色下是否有用户绑定, 有的话提醒不能删除
if (null == actionId) {
throw new IllegalArgumentException("权限ID不能为空");
}
UacAction uacAction = uacActionMapper.selectByPrimaryKey(actionId);
if (uacAction == null) {
logger.error("找不到权限信息 actionId={}", actionId);
throw new UacBizException(ErrorCodeEnum.UAC10014001, actionId);
}
// 删除角色权限表数据 不查询了 直接删除了
uacRoleActionMapper.deleteByActionId(actionId);
return uacActionMapper.deleteByPrimaryKey(actionId);
}
@Override
public void batchDeleteByIdList(List<Long> deleteIdList) {
logger.info("批量删除角色. deleteIdList={}", deleteIdList);
Preconditions.checkArgument(PublicUtil.isNotEmpty(deleteIdList), "删除权限ID不能为空");
int result = uacActionMapper.batchDeleteByIdList(deleteIdList);
if (result < deleteIdList.size()) {
throw new UacBizException(ErrorCodeEnum.UAC10014002, Joiner.on(GlobalConstant.Symbol.COMMA).join(deleteIdList));
}
}
View on GitHub (pinned to 781281a950)