update rate limit error message

This commit is contained in:
Eneko Lakasta 2018-07-03 14:36:29 +02:00
parent 6a6815d893
commit 409a103990
2 changed files with 2 additions and 2 deletions

View File

@ -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';

View File

@ -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');