File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lazer/sdk/rust/protocol/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,18 +87,18 @@ pub struct JrpcErrorObject {
8787
8888#[ derive( Debug , Eq , PartialEq ) ]
8989pub enum JrpcError {
90- ParseError ,
90+ ParseError ( String ) ,
9191 InternalError ,
9292}
9393
9494// note: error codes can be found in the rfc https://www.jsonrpc.org/specification#error_object
9595impl From < JrpcError > for JrpcErrorObject {
9696 fn from ( error : JrpcError ) -> Self {
9797 match error {
98- JrpcError :: ParseError => JrpcErrorObject {
98+ JrpcError :: ParseError ( error_message ) => JrpcErrorObject {
9999 code : -32700 ,
100100 message : "Parse error" . to_string ( ) ,
101- data : None ,
101+ data : Some ( error_message . into ( ) ) ,
102102 } ,
103103 JrpcError :: InternalError => JrpcErrorObject {
104104 code : -32603 ,
You can’t perform that action at this time.
0 commit comments