@@ -118,7 +118,10 @@ impl Proxy for RestClient {
118118 . post ( url)
119119 . header ( CONTENT_TYPE , JSON )
120120 . json ( & body)
121- . send ( ) ?
121+ . send ( )
122+ . map_err ( |e| Error :: Proxy {
123+ details : e. to_string ( ) ,
124+ } ) ?
122125 . json :: < JsonRpcResponse < ServerInfoResponse > > ( )
123126 . map_err ( InternalError :: from) ?)
124127 }
@@ -134,7 +137,10 @@ impl Proxy for RestClient {
134137 . post ( url)
135138 . header ( CONTENT_TYPE , JSON )
136139 . json ( & body)
137- . send ( ) ?
140+ . send ( )
141+ . map_err ( |e| Error :: Proxy {
142+ details : e. to_string ( ) ,
143+ } ) ?
138144 . json :: < JsonRpcResponse < bool > > ( )
139145 . map_err ( InternalError :: from) ?)
140146 }
@@ -154,7 +160,10 @@ impl Proxy for RestClient {
154160 . post ( url)
155161 . header ( CONTENT_TYPE , JSON )
156162 . json ( & body)
157- . send ( ) ?
163+ . send ( )
164+ . map_err ( |e| Error :: Proxy {
165+ details : e. to_string ( ) ,
166+ } ) ?
158167 . json :: < JsonRpcResponse < GetConsignmentResponse > > ( )
159168 . map_err ( InternalError :: from) ?)
160169 }
@@ -170,7 +179,10 @@ impl Proxy for RestClient {
170179 . post ( url)
171180 . header ( CONTENT_TYPE , JSON )
172181 . json ( & body)
173- . send ( ) ?
182+ . send ( )
183+ . map_err ( |e| Error :: Proxy {
184+ details : e. to_string ( ) ,
185+ } ) ?
174186 . json :: < JsonRpcResponse < String > > ( )
175187 . map_err ( InternalError :: from) ?)
176188 }
@@ -191,7 +203,10 @@ impl Proxy for RestClient {
191203 . post ( url)
192204 . header ( CONTENT_TYPE , JSON )
193205 . json ( & body)
194- . send ( ) ?
206+ . send ( )
207+ . map_err ( |e| Error :: Proxy {
208+ details : e. to_string ( ) ,
209+ } ) ?
195210 . json :: < JsonRpcResponse < bool > > ( )
196211 . map_err ( InternalError :: from) ?)
197212 }
@@ -224,7 +239,10 @@ impl Proxy for RestClient {
224239 Ok ( self
225240 . post ( url)
226241 . multipart ( form)
227- . send ( ) ?
242+ . send ( )
243+ . map_err ( |e| Error :: Proxy {
244+ details : e. to_string ( ) ,
245+ } ) ?
228246 . json :: < JsonRpcResponse < bool > > ( )
229247 . map_err ( InternalError :: from) ?)
230248 }
@@ -248,7 +266,10 @@ impl Proxy for RestClient {
248266 Ok ( self
249267 . post ( url)
250268 . multipart ( form)
251- . send ( ) ?
269+ . send ( )
270+ . map_err ( |e| Error :: Proxy {
271+ details : e. to_string ( ) ,
272+ } ) ?
252273 . json :: < JsonRpcResponse < bool > > ( )
253274 . map_err ( InternalError :: from) ?)
254275 }
0 commit comments