This repository was archived by the owner on May 15, 2026. It is now read-only.
Commit f3caed7
committed
fix: use task stored API config as fallback for rate limit
When provider state is unavailable (state is undefined/null), fall back to the task's stored apiConfiguration for rate limiting instead of defaulting to 0.
This prevents rate limiting from being silently disabled in edge cases where getState() fails or provider reference is temporarily lost.
Changes:
- Line 3643 (attemptApiRequest): Use (apiConfiguration ?? this.apiConfiguration)
- Line 3974 (backoffAndAnnounce): Use (state?.apiConfiguration ?? this.apiConfiguration)
Both locations now follow the same pattern:
1. Prefer the most up-to-date config from provider state
2. Fall back to task's stored config if state unavailable
3. Only default to 0 if neither source has a config1 parent 2bb3755 commit f3caed7
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3640 | 3640 | | |
3641 | 3641 | | |
3642 | 3642 | | |
3643 | | - | |
| 3643 | + | |
3644 | 3644 | | |
3645 | 3645 | | |
3646 | 3646 | | |
| |||
3971 | 3971 | | |
3972 | 3972 | | |
3973 | 3973 | | |
3974 | | - | |
| 3974 | + | |
3975 | 3975 | | |
3976 | 3976 | | |
3977 | 3977 | | |
| |||
0 commit comments