File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ impl fmt::Display for AlignedError {
6565
6666#[ derive( Debug ) ]
6767pub enum SubmitError {
68- WebSocketConnectionError ( tokio_tungstenite :: tungstenite :: Error ) ,
68+ WebSocketConnectionError ( String ) ,
6969 WebSocketClosedUnexpectedlyError ( CloseFrame < ' static > ) ,
7070 IoError ( PathBuf , io:: Error ) ,
7171 SerializationError ( SerializationError ) ,
@@ -104,7 +104,7 @@ pub enum SubmitError {
104104
105105impl From < tokio_tungstenite:: tungstenite:: Error > for SubmitError {
106106 fn from ( e : tokio_tungstenite:: tungstenite:: Error ) -> Self {
107- SubmitError :: WebSocketConnectionError ( e)
107+ SubmitError :: WebSocketConnectionError ( e. to_string ( ) )
108108 }
109109}
110110
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ pub async fn send_messages(
7070 // Send the message
7171 if let Err ( e) = ws_write. send ( Message :: Binary ( msg_bin. clone ( ) ) ) . await {
7272 error ! ( "Error while sending message: {:?}" , e) ;
73- sent_verification_data. push ( Err ( SubmitError :: WebSocketConnectionError ( e) ) ) ;
73+ sent_verification_data. push ( Err ( SubmitError :: WebSocketConnectionError ( e. to_string ( ) ) ) ) ;
7474 return sent_verification_data;
7575 }
7676
Original file line number Diff line number Diff line change @@ -258,7 +258,11 @@ pub async fn submit_multiple(
258258) -> Vec < Result < AlignedVerificationData , errors:: SubmitError > > {
259259 let ( ws_stream, _) = match connect_async ( network. get_batcher_url ( ) ) . await {
260260 Ok ( ( ws_stream, response) ) => ( ws_stream, response) ,
261- Err ( e) => return vec ! [ Err ( errors:: SubmitError :: WebSocketConnectionError ( e) ) ] ,
261+ Err ( e) => {
262+ return vec ! [ Err ( errors:: SubmitError :: WebSocketConnectionError (
263+ e. to_string( ) ,
264+ ) ) ]
265+ }
262266 } ;
263267
264268 debug ! ( "WebSocket handshake has been successfully completed" ) ;
You can’t perform that action at this time.
0 commit comments