Handle errors based on intent: make operations idempotent for known conflicts, and explicitly classify/propagate errors for known transient conditions.
Apply this standard in test scripts and helper utilities:
catch, and:
MOVED*, ASK*) as recoverable (retry/continue).Example patterns:
# Known conflict: make restore idempotent
catch {r restore key 0 $crafted replace} err
# Known transient cluster routing: ignore MOVED/ASK, fail fast otherwise
if {$cluster_load == 1} {
if {[catch {$r read} err]} {
if {[string match {MOVED*} $err] || [string match {ASK*} $err]} {
continue
}
error $err
}
} else {
$r read
}
Enter the URL of a public GitHub repository