File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,20 +99,20 @@ if _, ok := err.(*github.RateLimitError); ok {
9999Learn more about GitHub rate limiting at
100100http://developer.github.com/v3/#rate-limiting .
101101
102- ### Accepted status ###
102+ ### Accepted Status ###
103103
104104Some endpoints may return a 202 Accepted status code, meaning that the
105- information required is not yet ready and was scheduled to be gather in
106- GitHub side. Methods know to behave like this are documented specifying
105+ information required is not yet ready and was scheduled to be gathered on
106+ GitHub side. Methods known to behave like this are documented specifying
107107this behavior.
108108
109109To detect this condition of error, you can check if its type is
110110` *github.AcceptedError ` :
111111
112112``` go
113- repos , _ , err := client.Repositories .ListContributorsStats (org, repo)
113+ stats , _ , err := client.Repositories .ListContributorsStats (org, repo)
114114if _ , ok := err.(*github.AcceptedError ); ok {
115- log.Println (" scheduled on github side" )
115+ log.Println (" scheduled on github side" )
116116}
117117```
118118
Original file line number Diff line number Diff line change @@ -86,17 +86,17 @@ To detect an API rate limit error, you can check if its type is *github.RateLimi
8686Learn more about GitHub rate limiting at
8787http://developer.github.com/v3/#rate-limiting.
8888
89- Accepted status
89+ Accepted Status
9090
9191Some endpoints may return a 202 Accepted status code, meaning that the
92- information required is not yet ready and was scheduled to be gather in
93- GitHub side. Methods know to behave like this are documented specifying
92+ information required is not yet ready and was scheduled to be gathered on
93+ GitHub side. Methods known to behave like this are documented specifying
9494this behavior.
9595
9696To detect this condition of error, you can check if its type is
9797*github.AcceptedError:
9898
99- repos , _, err := client.Repositories.ListContributorsStats(org, repo)
99+ stats , _, err := client.Repositories.ListContributorsStats(org, repo)
100100 if _, ok := err.(*github.AcceptedError); ok {
101101 log.Println("scheduled on github side")
102102 }
You can’t perform that action at this time.
0 commit comments