AUR9996
Error Message
AUR9996: Invalid usage, a rate limit has already been applied. Did you have both throttle and debounce on the same binding?
Description
This error occurs when you attempt to apply more than one rate-limiting binding behavior (throttle or debounce) to the same binding expression. Aurelia's binding system allows only one of these behaviors per binding.
Cause
The direct cause is using both & throttle and & debounce on the same binding expression in your template.
Example:
<input value.bind="searchTerm & throttle:500 & debounce:1000">
Solution
Choose only one rate-limiting strategy for the binding:
Select
throttleORdebounce: Decide whether you needthrottle(limits execution frequency to at most once per specified interval) ordebounce(delays execution until a specified period of inactivity has passed). Remove the behavior you don't need.Refactor Logic: If you have a complex scenario where you feel both might be needed, reconsider the approach. Perhaps the logic can be handled within the view model, potentially using separate triggers or more sophisticated event handling (e.g., using RxJS if already part of your project).
Example
Debugging Tips
Inspect the binding expression in your template identified by the error or stack trace.
Look for the presence of both
& throttleand& debouncewithin that single expression.Remove one of the binding behaviors (
throttleordebounce) to resolve the error.
Last updated
Was this helpful?