data Unavailable
The callee cannot be reached or refuses work right now (refused, reset, no replica, overload). retryAfter is the hint of @ratelimit. One of the alternatives of NetError.
Example:
fn wait_hint(e: Unavailable) -> Duration => e.retryAfter ?? 1s
fn main() io {
print("{wait_hint(Unavailable{ retryAfter: 5s }).seconds()} {wait_hint(Unavailable{}).seconds()}")
}Output
5 1
@error pub(api) data UnavailableSince. 1.0.0-beta
Fields
pub(api) retryAfter: Duration? = none | Hint of |
Defined in: std/core/types.oxl:1310