We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ccf9db2 + 0a52bf7 commit ee06628Copy full SHA for ee06628
src/lib.rs
@@ -217,9 +217,10 @@ pub fn get_capability(our: &Address, params: &str) -> Option<Capability> {
217
.cloned()
218
}
219
220
-pub fn await_next_request_body() -> anyhow::Result<Vec<u8>> {
221
- let Ok(Message::Request { body, .. }) = await_message() else {
222
- return Err(anyhow::anyhow!("failed to get request body, bailing out"));
223
- };
224
- Ok(body)
+/// get the next message body from the message queue, or propagate the error
+pub fn await_next_message_body() -> Result<Vec<u8>, SendError> {
+ match await_message() {
+ Ok(msg) => Ok(msg.body().to_vec()),
+ Err(e) => Err(e.into()),
225
+ }
226
0 commit comments