MCPcopy
hub / github.com/slackapi/node-slack-sdk / parseRetryHeaders

Function parseRetryHeaders

packages/web-api/src/WebClient.ts:829–834  ·  view source on GitHub ↗

* Extract the amount of time (in seconds) the platform has recommended this client wait before sending another request * from a rate-limited HTTP response (statusCode = 429).

(response: AxiosResponse)

Source from the content-addressed store, hash-verified

827 * from a rate-limited HTTP response (statusCode = 429).
828 */
829function parseRetryHeaders(response: AxiosResponse): number | undefined {
830 if (response.headers['retry-after'] !== undefined) {
831 return parseInt((response.headers['retry-after'] as string), 10);
832 }
833 return undefined;
834}

Callers 2

taskMethod · 0.85
buildResultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected