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

Commit 3b75863

Browse files
author
Taylor Kline
committed
Mention handling errors by status codes in README
1 parent 797c0b5 commit 3b75863

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
@@ -192,6 +192,18 @@ Geographies: http://instagr.am/developer/endpoints/geographies/
192192
api.geography_recent_media(count, max_id, geography_id)*
193193
```
194194

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

0 commit comments

Comments
 (0)