MCPcopy Create free account
hub / github.com/actix/examples / ErrorData

Class ErrorData

json/jsonrpc/src/convention.rs:14–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12/// error member with a value that is a Object with the following members:
13#[derive(Debug, Serialize, Deserialize)]
14pub struct ErrorData {
15 /// A Number that indicates the error type that occurred. This MUST be an integer.
16 pub code: i32,
17
18 /// A String providing a short description of the error. The message SHOULD be
19 /// limited to a concise single sentence.
20 pub message: String,
21
22 /// A Primitive or Structured value that contains additional information
23 /// about the error. This may be omitted. The value of this member is
24 /// defined by the Server (e.g. detailed error information, nested errors
25 /// etc.).
26 pub data: Value,
27}
28
29impl ErrorData {
30 pub fn new(code: i32, message: &str) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected