You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit tricky to work with, given that users might try to match
only errors (ie if let Err(err) = sink.send() { stop_service(); }).
To improve the API, ensure that on success Ok(()) is returned and on
failure have a dedicated error to differentiate between disconnect errors
or serde errors:
Ideally, folks shouldn't don't have to bother with this API at all and use pipe_from_sink but there might some edge-cases where one want to use send.
I think we designed it just like that around the pipe_from_sink i.e, not to regard ConnectionClosed as an error.
In addition serde::Serialization errors are most likely bugs and should not really occur.
Anyway, I'm all good with regarding all send errors as an error instead and to make this API cleaner.
The send API of the subscription sink can return the following:
jsonrpsee/core/src/server/rpc_module.rs
Lines 888 to 902 in dbac4bd
This is a bit tricky to work with, given that users might try to match
only errors (ie
if let Err(err) = sink.send() { stop_service(); }
).To improve the API, ensure that on success
Ok(())
is returned and onfailure have a dedicated error to differentiate between disconnect errors
or serde errors:
The text was updated successfully, but these errors were encountered: