JSON-RPC 2.0 error structure. This is an internal class representing an error in a JSON-RPC response. It contains an error code, message, and optional additional data. Standard Error Codes -32700: Parse error -32600: Invalid Request -32601: Method not found</
| 28 | * @since 1.0.0 |
| 29 | */ |
| 30 | @JsonInclude(JsonInclude.Include.NON_NULL) |
| 31 | public final class JsonRpcError { |
| 32 | |
| 33 | @JsonProperty("code") |
| 34 | private int code; |
| 35 | |
| 36 | @JsonProperty("message") |
| 37 | private String message; |
| 38 | |
| 39 | @JsonProperty("data") |
| 40 | private Object data; |
| 41 | |
| 42 | /** |
| 43 | * Gets the error code. |
| 44 | * |
| 45 | * @return the integer error code |
| 46 | */ |
| 47 | public int getCode() { |
| 48 | return code; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Sets the error code. |
| 53 | * |
| 54 | * @param code |
| 55 | * the integer error code |
| 56 | */ |
| 57 | public void setCode(int code) { |
| 58 | this.code = code; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Gets the error message. |
| 63 | * |
| 64 | * @return the human-readable error message |
| 65 | */ |
| 66 | public String getMessage() { |
| 67 | return message; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Sets the error message. |
| 72 | * |
| 73 | * @param message |
| 74 | * the error message |
| 75 | */ |
| 76 | public void setMessage(String message) { |
| 77 | this.message = message; |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Gets the additional error data. |
| 82 | * |
| 83 | * @return the additional data, or {@code null} if none |
| 84 | */ |
| 85 | public Object getData() { |
| 86 | return data; |
| 87 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…