It might happen that a job from the aggregate returned an error!
This is what the vague "[json.exception.type_error.302] type must be string, but is null"
was all about in this instance; there was no drvPath
to stringify!
So we now actively watch for errors and copy them to the aggregate job.
KTH67GR42MDWAAW34EYC6BPHSO33HHWZCMB3QSXRPH2LNZM45EHQC
auto drvPath2 = store->parseStorePath((std::string) (*job2)["drvPath"]);
auto drv2 = store->readDerivation(drvPath2);
job["constituents"].push_back(store->printStorePath(drvPath2));
drv.inputDrvs[drvPath2] = {drv2.outputs.begin()->first};
if ((*job2).find("error") != (*job2).end()) {
if (job.find("error") == job.end()) {
job["error"] = fmt("Errors aggregating aggregate job '%1%'.\n", jobName);
}
job["error"] = fmt("While handling '%1%': %2%\n", jobName2, (std::string) (*job2)["error"]);
} else {
auto drvPath2 = store->parseStorePath((std::string) (*job2)["drvPath"]);
auto drv2 = store->readDerivation(drvPath2);
job["constituents"].push_back(store->printStorePath(drvPath2));
drv.inputDrvs[drvPath2] = {drv2.outputs.begin()->first};
}