MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / res_err

Function res_err

subprojects/llama.cpp/tools/server/server-models.cpp:758–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758static void res_err(std::unique_ptr<server_http_res> & res, const json & error_data) {
759 res->status = json_value(error_data, "code", 500);
760 res->data = safe_json_to_str({{ "error", error_data }});
761}
762
763static bool router_validate_model(const std::string & name, server_models & models, bool models_autoload, std::unique_ptr<server_http_res> & res) {
764 if (name.empty()) {

Callers 2

router_validate_modelFunction · 0.85
init_routesMethod · 0.85

Calls 2

json_valueFunction · 0.85
safe_json_to_strFunction · 0.85

Tested by

no test coverage detected