feat: add ClientOptions#retryLimit (#2805)

* feat: add ClientOptions#retryLimit

* hydra needs to learn how to code right

* a default would probably help

* move incrementor & update comment

* clarify docs on Infinity
This commit is contained in:
Isabella
2018-08-31 21:51:35 -05:00
committed by Crawl
parent 3970c5005b
commit be4d6f9dc3
5 changed files with 10 additions and 3 deletions

View File

@@ -436,6 +436,9 @@ class Client extends BaseClient {
if (!(options.disabledEvents instanceof Array)) {
throw new TypeError('CLIENT_INVALID_OPTION', 'disabledEvents', 'an Array');
}
if (typeof options.retryLimit !== 'number' || isNaN(options.retryLimit)) {
throw new TypeError('CLIENT_INVALID_OPTION', 'retryLimit', 'a number');
}
}
}