- let req = req.ok_or_else(|| anyhow!("webservers all shut down!"))?;
- outstanding.push_back(Outstanding {
- reply: req.reply,
- max_requests_outstanding: 42, // xxx
- });
+ let WebRequest {
+ initial, initial_remaining, body,
+ reply_to, warnings,
+ } = req.ok_or_else(|| anyhow!("webservers all shut down!"))?;
+
+ match (||{
+ Ok::<_,AE>(())
+ })() {
+ Ok(()) => outstanding.push_back(Outstanding {
+ reply_to: reply_to,
+ max_requests_outstanding: 42, // xxx
+ }),
+ Err(e) => {
+ try_send_response(reply_to, WebResponse {
+ data: Err(e),
+ warnings,
+ });
+ },
+ }