MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getRetryAfter

Function getRetryAfter

out/cli.cjs:74655–74667  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

74653 if (axios_default.isAxiosError(error)) {
74654 return error.response?.status ?? null;
74655 }
74656 if (typeof error?.response?.status === "number") {
74657 return error.response.status;
74658 }
74659 return null;
74660}
74661function getRetryAfter(error) {
74662 const headers = error?.response?.headers;
74663 if (headers) {
74664 const retryAfter = headers["retry-after"] || headers["Retry-After"];
74665 if (retryAfter) {
74666 const seconds = parseInt(retryAfter, 10);
74667 if (!isNaN(seconds)) {
74668 return seconds;
74669 }
74670 }

Callers 1

normalizeEngineErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…