fix: oops apparently valid status codes end at 999

This commit is contained in:
əlemi 2024-05-31 19:08:16 +02:00
parent ea595b39a7
commit 3dfb432b0f
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -29,7 +29,7 @@ pub async fn serve(ctx: upub::Context, bind: String) -> upub::Result<()> {
.layer( .layer(
// TODO 4xx errors aren't really failures but since upub is in development it's useful to log // TODO 4xx errors aren't really failures but since upub is in development it's useful to log
// these too, in case something's broken // these too, in case something's broken
TraceLayer::new(SharedClassifier::new(StatusInRangeAsFailures::new(300..=u16::MAX))) TraceLayer::new(SharedClassifier::new(StatusInRangeAsFailures::new(300..=999)))
.make_span_with(|req: &axum::http::Request<_>| { .make_span_with(|req: &axum::http::Request<_>| {
tracing::span!( tracing::span!(
tracing::Level::INFO, tracing::Level::INFO,