Check out example codes for "python requests exceptions". It will help you in understanding the concepts better.

Code Example 1

try:
    r = requests.get(url, params={'s': thing})
except requests.exceptions.RequestException as e:  # This is the correct syntax
    raise SystemExit(e)

Learn ReactJs, React Native from akashmittal.com