| 12 | /// error member with a value that is a Object with the following members: |
| 13 | #[derive(Debug, Serialize, Deserialize)] |
| 14 | pub 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 | |
| 29 | impl ErrorData { |
| 30 | pub fn new(code: i32, message: &str) -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected