update rate limit error message
This commit is contained in:
parent
6a6815d893
commit
409a103990
@ -47,7 +47,7 @@ function rateLimit(userLimitsBackend, endpointGroup = null) {
|
||||
res.set('Retry-After', retry + 1);
|
||||
|
||||
let rateLimitError = new Error(
|
||||
'You are over platform\'s limits. Please contact us to know more details'
|
||||
'You are over platform\'s limits: too many requests. Please contact us to know more details'
|
||||
);
|
||||
rateLimitError.http_status = 429;
|
||||
rateLimitError.type = 'limit';
|
||||
|
@ -144,7 +144,7 @@ function assertRateLimitRequest (status, limit, remaining, reset, retry, done) {
|
||||
assert.ifError(err);
|
||||
} else {
|
||||
assert.ok(err);
|
||||
assert.equal(err.message, 'You are over platform\'s limits. Please contact us to know more details');
|
||||
assert.equal(err.message, 'You are over platform\'s limits: too many requests. Please contact us to know more details');
|
||||
assert.equal(err.http_status, 429);
|
||||
assert.equal(err.type, 'limit');
|
||||
assert.equal(err.subtype, 'rate-limit');
|
||||
|
Loading…
Reference in New Issue
Block a user