Default error message
This commit is contained in:
parent
dafe005cb2
commit
6edbfba7a4
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@ abstract class RateLimiter<User> {
|
|||
final String errorMessage;
|
||||
|
||||
RateLimiter(this.maxPointsPerWindow, this.windowDuration,
|
||||
{this.errorMessage = 'Rate limit exceeded.'});
|
||||
{String errorMessage})
|
||||
: this.errorMessage = errorMessage ?? 'Rate limit exceeded.';
|
||||
|
||||
/// Computes the current window in which the user is acting.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue