From f75b80d96b1f2594fd68d6eaf560d423078668c3 Mon Sep 17 00:00:00 2001 From: Lewdcario Date: Thu, 30 Aug 2018 16:31:22 -0600 Subject: [PATCH] docs: add docstring to HTTPError --- src/rest/HTTPError.js | 4 ++++ src/rest/RequestHandler.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rest/HTTPError.js b/src/rest/HTTPError.js index 293be7c5..32b3e6bd 100644 --- a/src/rest/HTTPError.js +++ b/src/rest/HTTPError.js @@ -1,3 +1,7 @@ +/** + * Represents a HTTP error from a request. + * @extends Error + */ class HTTPError extends Error { constructor(message, name, code, method, path) { super(message); diff --git a/src/rest/RequestHandler.js b/src/rest/RequestHandler.js index 67d64503..c6ea73ba 100644 --- a/src/rest/RequestHandler.js +++ b/src/rest/RequestHandler.js @@ -127,7 +127,7 @@ class RequestHandler { // Set the manager's global timeout as the promise for other requests to "wait" this.manager.globalTimeout = Util.delayFor(this.retryAfter); - // Wait for the global timeout to resolve before continue + // Wait for the global timeout to resolve before continuing await this.manager.globalTimeout; // Clean up global timeout @@ -140,7 +140,7 @@ class RequestHandler { if (res.ok) { const success = await parseResponse(res); - // Nothing wrong with the request, proceed with the next + // Nothing wrong with the request, proceed with the next one resolve(success); return this.run(); } else if (res.status === 429) {