Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-session/src/cache.rs

Steven Enamakel0d598b0fe2c2
diff --git a/crates/openhuman-session/src/cache.rs b/crates/openhuman-session/src/cache.rs
index a75afd0c1a..84b3589673 100644
--- a/crates/openhuman-session/src/cache.rs
+++ b/crates/openhuman-session/src/cache.rs
@@ -249,18 +249,8 @@ impl CurrentUserCache {
let generation = self.lock().generation;
if !force {
- if let Some((error, consecutive, retry_in)) = self.suppressed(&key) {
- // Rejections are authoritative. A stale-while-revalidate
- // caller cannot observe the background result directly, so
- // retain it until the next read can hand it to the owner.
- if matches!(error, FetchMeError::Rejected(_)) {
- return Err(error);
- }
- return Err(FetchMeError::Suppressed {
- message: error.message().to_string(),
- consecutive,
- retry_in,
- });
+ if let Some(error) = self.suppressed_error(&key) {
+ return Err(error);
}
if let Some((user, age)) = self.cached(&key) {
if age < REFRESH_TTL {