You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've given it a try for the github middleware: github.py:
@github_api.route(path)@cache.cached(timeout=300)defgithub():
# TODO: how to handle exception and error, see issue#1.try:
response=requests.get(
'https://api.github.com/users/{0}/events/public'.format(username))
exceptrequests.RequestExceptionaserror:
returnjsonify(error_message=str(error.message))
ifresponse.status_code==200:
returnjsonify(github=response.json())
else:
returnjsonify(status_code=response.status_code)
No description provided.
The text was updated successfully, but these errors were encountered: