MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / error_json

Function error_json

src/cli/runtime_settings.c:706–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706static char *error_json(const char *message, int code, int *status) {
707 if (status)
708 *status = code;
709 yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
710 if (!doc)
711 return NULL;
712 yyjson_mut_val *root = yyjson_mut_obj(doc);
713 yyjson_mut_doc_set_root(doc, root);
714 json_string(doc, root, "error", message);
715 char *json = yyjson_mut_write_opts(doc, 0, cbm_json_writer_allocator(), NULL, NULL);
716 yyjson_mut_doc_free(doc);
717 return json;
718}
719
720/* An unchanged value is not rewritten: the UPDATE would still fire the revision
721 * trigger, so every `daemon start` on a UI build committed (journal + fsync) and

Callers 1

Calls 2

json_stringFunction · 0.85

Tested by

no test coverage detected