Errors — Concurrent
Package:
@litert/concurrentSource: packages/partials/concurrent/src/Types.ts, packages/partials/concurrent/src/Classes/MemoryMutex.ts
E_RATE_LIMITED
Error thrown when a rate limiter blocks a call.
ts
import { E_RATE_LIMITED } from '@litert/concurrent';| Property | Value |
|---|---|
message | 'The rate limit has been exceeded.' |
name | 'rate_limited' |
| Extends | Error |
Notes
- Thrown by
CountingRateLimiter,TokenBucketRateLimiter,LeakyBucketRateLimiter, and their manager variants when a challenge fails. - The concrete error class can be replaced via the
errorCtorOnLimitedoption in each rate limiter's constructor.
E_BREAKER_OPENED
Error thrown when a circuit breaker is open and blocks a call.
ts
import { E_BREAKER_OPENED } from '@litert/concurrent';| Property | Value |
|---|---|
message | 'The breaker is open.' |
name | 'breaker_opened' |
| Extends | Error |
Notes
- Thrown by
ManualBreakerandCircuitBreakerwhencall()is invoked while the breaker is open. - The concrete error class can be replaced via the
errorCtorOnOpen/errorCtoroption in each breaker's constructor.
E_LOCK_FAILED
Error thrown when a mutex lock cannot be acquired.
ts
import { E_LOCK_FAILED } from '@litert/concurrent';| Property | Value |
|---|---|
message | 'Failed to acquire the lock.' |
name | 'lock_failed' |
| Extends | Error |
Notes
- Thrown by
MemoryMutex.run()andMemoryMutex.wrap()when the lock is not available.