# Assume you are using the blog_url and Tumblpy instance from the previous sections try: follow = t.post('user/follow', params={'url': 'omglegit.tumblr.com'}) except TumblpyError: # if the url given in params is not valid, # Tumblr will respond with a 404 and Tumblpy will raise a TumblpyError