MCPcopy Create free account
hub / github.com/FastLED/FastLED / makeJsonRpcError

Function makeJsonRpcError

src/fl/remote/rpc/rpc_registry.h:61–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59// =============================================================================
60
61inline json makeJsonRpcError(int code, const fl::string& message, const json& id) {
62 json response = json::object();
63 response.set("jsonrpc", "2.0");
64
65 json error = json::object();
66 error.set("code", code);
67 error.set("message", message);
68 response.set("error", error);
69
70 if (id.has_value()) {
71 response.set("id", id);
72 }
73
74 return response;
75}
76
77} // namespace detail
78} // namespace fl

Callers 1

handleMethod · 0.85

Calls 2

setMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected