{"modulePath":"github.com/caarlos0/org-stats","version":"v1.12.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package githuberrors\n\n## Constants\n\n```go\nconst (\n\tSecondaryRateLimitMessage                 = `You have exceeded a secondary rate limit`\n\tSecondaryRateLimitDocumentationPathSuffix = `secondary-rate-limits`\n\tHeaderXRateLimitRemaining                 = \"x-ratelimit-remaining\"\n\tHeaderRetryAfter                          = \"retry-after\"\n\tHeaderXRateLimitReset                     = \"x-ratelimit-reset\"\n)\n```\n\n## Types\n\n```go\ntype SecondaryRateLimitBody struct {\n\tMessage     string `json:\"message\"`\n\tDocumentURL string `json:\"documentation_url\"`\n}\n```\n\n```go\nfunc (s SecondaryRateLimitBody) IsSecondaryRateLimit() bool\n```\nIsSecondaryRateLimit checks whether the response is a legitimate secondary rate limit. It checks the prefix of the message and the suffix of the documentation URL in the response body in case the message or documentation URL is modified in the future. [https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits](https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)\n\n```go\ntype SecondaryRateLimitError struct {\n\tResponse   http.Response\n\tBody       *SecondaryRateLimitBody\n\tRetryAfter *time.Time\n}\n```\n\n```go\nfunc IsSecondaryRateLimitError(r *github.Response) (bool, *SecondaryRateLimitError)\n```\n\n```go\nfunc (s *SecondaryRateLimitError) Error() string\n```\n\n","path":"github.com/caarlos0/org-stats/github_errors","name":"githuberrors","synopsis":"","isRedistributable":true}
