Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 7194301

Browse files
committed
Merge pull request #103 from jkdf2/master
Mention handling errors by status codes in README
2 parents 435f7b7 + 3b75863 commit 7194301

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,18 @@ Geographies: http://instagr.am/developer/endpoints/geographies/
194194
api.geography_recent_media(count, max_id, geography_id)*
195195
```
196196

197+
Error handling
198+
------
199+
Importing the bind module allows handling of specific error status codes. An example is provided below:
200+
``` python
201+
from instagram.bind import InstagramAPIError
202+
203+
try:
204+
# your code goes here
205+
except InstagramAPIError as e:
206+
if (e.status_code == 400):
207+
print "\nUser is set to private."
208+
```
197209
Sample app
198210
------
199211
This repository includes a one-file sample app that uses the bottle framework and demonstrates

0 commit comments

Comments
 (0)