fix old log loading
This commit is contained in:
+8
-2
@@ -82,8 +82,14 @@ async fn logs_response(
|
||||
match state.history.page(before, limit).await {
|
||||
Ok(page) => Json(page).into_response(),
|
||||
Err(code) if code == "invalid_cursor" => error(StatusCode::BAD_REQUEST, "invalid_cursor"),
|
||||
Err(code) if code == "stale_cursor" => error(StatusCode::CONFLICT, "stale_cursor"),
|
||||
Err(_) => error(StatusCode::UNPROCESSABLE_ENTITY, "history_unavailable"),
|
||||
Err(code) if code == "stale_cursor" => {
|
||||
tracing::debug!(event = "history_page_failed", reason = "stale_cursor");
|
||||
error(StatusCode::CONFLICT, "stale_cursor")
|
||||
}
|
||||
Err(code) => {
|
||||
tracing::warn!(event = "history_page_failed", reason = %code);
|
||||
error(StatusCode::UNPROCESSABLE_ENTITY, "history_unavailable")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user