theonedev/onedev · error · NotFoundException
Previous successful similar build not found
Error message
Previous successful similar build not found
What it means
get-previous-successful-similar-build found no earlier build in the project that both succeeded and matches the current build's relevant criteria (same job/branch context), so there is no baseline build to return.
Source
Thrown at server-core/src/main/java/io/onedev/server/ai/TodResource.java:997
}
@Path("/get-previous-successful-similar-build")
@GET
public Map<String, Object> getPreviousSuccessfulSimilarBuild(
@QueryParam("currentProject") @NotNull String currentProjectPath,
@QueryParam("reference") @NotNull String buildReference) {
if (SecurityUtils.getUser() == null)
throw new UnauthenticatedException();
var currentProject = getProject(currentProjectPath);
var build = getBuild(currentProject, buildReference);
var foundBuild = buildService.findPreviousSuccessfulSimilar(build);
if (foundBuild != null)
return BuildHelper.getDetail(currentProject, foundBuild);
else
throw new NotFoundException("Previous successful similar build not found");
}
@Path("/get-pull-request")
@GET
public Map<String, Object> getPullRequestDetail(
@QueryParam("currentProject") @NotNull String currentProjectPath,
@QueryParam("reference") @NotNull String pullRequestReference,
@QueryParam("forWrite") Boolean forWrite) {
if (SecurityUtils.getUser() == null)
throw new UnauthenticatedException();
var currentProject = getProject(currentProjectPath);
var pullRequest = getPullRequest(currentProject, pullRequestReference);
if (forWrite != null && forWrite) {
if (pullRequest.getSourceProject() == null)
throw new NotAcceptableException("Pull request source project no longer exists");
View on GitHub (pinned to d44925c47c)
Solutions
- Verify the reference build is correct and that prior successful builds exist for this job/branch.
- Handle the absence of a baseline gracefully instead of retrying.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at server-core/src/main/java/io/onedev/server/ai/TodResource.java:997 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/377251b3ffd383eb.
Report an issue: GitHub.