Skip to content

Commit a230411

Browse files
authored
Merge pull request #132 from mrrfv/ratelimit-text-change
Clarify the meaning of the request error/ratelimit message
2 parents fdd45e8 + f084847 commit a230411

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ const request = async (url, options) => {
124124
return data;
125125
} catch (error) {
126126
attempts++;
127-
console.warn(`An error occured while making a web request: "${error}", retrying. Attempt ${attempts} of ${maxAttempts}.`)
127+
console.warn(`An error occured while making a web request: "${error}", retrying. Attempt ${attempts} of ${maxAttempts}.\nTHIS IS NORMAL IN MOST CIRCUMSTANCES. Refrain from reporting this as a bug unless the script doesn't automatically recover after several attempts.`);
128128
if(attempts >= maxAttempts) {
129129
// Send a message to the Discord webhook if it exists
130130
await notifyWebhook(`An HTTP error has occurred (${response ? response.status : "unknown status"}) while making a web request. Please check the logs for further details.`);
131131
throw new Error(`HTTP error! Status: ${response.status} - ${ (data && 'errors' in data) ? data.errors[0].message : data } - ${error}`);
132132
}
133-
await wait(5000);
133+
await wait(8000);
134134
}
135135
}
136136
};

0 commit comments

Comments
 (0)