Closed Volox closed 9 years ago
At a glance this looks great. Tied up working in the ICU until Sunday and will take a look then.
Thanks!
On Thursday, February 12, 2015, Riccardo Volonterio < notifications@github.com> wrote:
Hi, i refactored some code to support native errors from Instagram. Now by using type assertion i can check if the error is an instagram.InstagramError. This enables to find rete limit errors such as OAuthRateLimitException.
Example:
ig, = instagram.NewClient(nil), _, err := ig.Tags.RecentMedia("test", nil)if igErr, ok := err.(*instagram.InstagramError); ok { fmt.Printf("InstagramError %s (%d): %s", igErr.ErrorType, igErr.Code, igErr.ErrorMessage) }
You can view, comment on, or merge this pull request online at:
https://github.com/carbocation/go-instagram/pull/4 Commit Summary
- Added InstagramError for better error handling
File Changes
- M instagram/instagram.go https://github.com/carbocation/go-instagram/pull/4/files#diff-0 (63)
- M instagram/tags.go https://github.com/carbocation/go-instagram/pull/4/files#diff-1 (17)
Patch Links:
- https://github.com/carbocation/go-instagram/pull/4.patch
- https://github.com/carbocation/go-instagram/pull/4.diff
— Reply to this email directly or view it on GitHub https://github.com/carbocation/go-instagram/pull/4.
Hi, i refactored some code to support native errors from Instagram. Now by using type assertion i can check if the error is an
instagram.InstagramError
. This enables to find rete limit errors such asOAuthRateLimitException
.Example: