Work in progress
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Failing after 5m1s
Build Packages / build:rpm (rocky8_nocuda) (push) Failing after 9m2s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 5m52s
Build Packages / build:rpm (rocky9_nocuda) (push) Failing after 11m0s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Failing after 11m26s
Build Packages / Build documentation (push) Successful in 1m12s
Build Packages / Create release (push) Has been skipped
Build Packages / Generate python client (push) Successful in 1m20s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 12m17s
Build Packages / build:rpm (rocky8) (push) Failing after 14m22s
Build Packages / build:rpm (rocky9) (push) Failing after 14m50s
Build Packages / build:rpm (rocky9_sls9) (push) Failing after 14m59s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 9m7s
Build Packages / Unit tests (push) Has been cancelled

This commit is contained in:
2026-03-23 21:41:09 +01:00
parent f06f146f6a
commit 75ed1f954e
+20 -2
View File
@@ -18,6 +18,26 @@
using namespace org::openapitools::server::model;
namespace {
template <class T>
static bool fromStringValue(const std::string& s, T& out) {
std::istringstream is(s);
is >> out;
return !is.fail() && is.eof();
}
template <>
static bool fromStringValue<std::string>(const std::string& s, std::string& out) {
out = s;
return true;
}
template <>
static bool fromStringValue<bool>(const std::string& s, bool& out) {
if (s == "true" || s == "1") { out = true; return true; }
if (s == "false" || s == "0") { out = false; return true; }
return false;
}
template <class T>
std::optional<T> query_optional(const httplib::Request& req, const char* name) {
if (!req.has_param(name))
@@ -82,8 +102,6 @@ std::pair<int, std::string> JFJochBrokerHttp::handleParsingException(const std::
throw;
} catch (nlohmann::detail::exception &e) {
return {400, e.what()};
} catch (ValidationException &e) {
return {400, e.what()};
} catch (std::exception &e) {
return {500, e.what()};
}