Skip to content

Commit a6a7a48

Browse files
Merge pull request #1701 from Mark-Simulacrum/log-failures
Log failure of agenda calls
2 parents 0cfa95a + 9527ee5 commit a6a7a48

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@ async fn run_server(addr: SocketAddr) -> anyhow::Result<()> {
265265
input,
266266
tower::limit::rate::Rate::new(2, std::time::Duration::from_secs(60)),
267267
)),
268-
|_| anyhow::anyhow!("Rate limit of 2 request / 60 seconds exceeded"),
268+
|e| {
269+
tracing::error!("agenda request failed: {:?}", e);
270+
anyhow::anyhow!("Rate limit of 2 request / 60 seconds exceeded")
271+
},
269272
)
270273
})
271274
.service_fn(handle_agenda_request);

0 commit comments

Comments
 (0)