Fix returning output when no offset present
This commit is contained in:
parent
901092ba09
commit
338674a9e6
|
@ -116,11 +116,13 @@ void getBuildActionOutput(const Params ¶ms, ResponseHandler &&handler)
|
||||||
handler(makeBadRequest(params.request(), "the offset parameter must be specified at most once"));
|
handler(makeBadRequest(params.request(), "the offset parameter must be specified at most once"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
if (!offsetParams.empty()) {
|
||||||
offset = stringToNumber<std::size_t>(offsetParams.front());
|
try {
|
||||||
} catch (const ConversionException &) {
|
offset = stringToNumber<std::size_t>(offsetParams.front());
|
||||||
handler(makeBadRequest(params.request(), "the offset must be an unsigned integer"));
|
} catch (const ConversionException &) {
|
||||||
return;
|
handler(makeBadRequest(params.request(), "the offset must be an unsigned integer"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
auto buildActionsSearchResult = findBuildActions(params, std::move(handler), false, 1);
|
auto buildActionsSearchResult = findBuildActions(params, std::move(handler), false, 1);
|
||||||
if (!buildActionsSearchResult.ok) {
|
if (!buildActionsSearchResult.ok) {
|
||||||
|
|
Loading…
Reference in New Issue