Skip to content

Commit

Permalink
Improved error handling when price cannot be read (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsyrjanen authored Jan 2, 2023
1 parent 84b29a6 commit f0fb4ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion check_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def define_price():
try:
price = define_price()
break
except NameError:
except NameError as e:
logging.exception("An error occurred: %s", e)
pass
except ValueError as e:
logging.exception("An error occurred: %s", e)
pass
finally:
Expand Down
5 changes: 4 additions & 1 deletion tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def define_price():
try:
price = define_price()
break
except NameError:
except NameError as e:
logger.exception("An error occurred: %s", e)
pass
except ValueError as e:
logger.exception("An error occurred: %s", e)
pass
finally:
Expand Down

1 comment on commit f0fb4ef

@vercel
Copy link

@vercel vercel bot commented on f0fb4ef Jan 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pirkkabot – ./

pirkkabot-git-master-juhosyrjanen.vercel.app
pirkkabot.vercel.app
pirkkabot-juhosyrjanen.vercel.app

Please sign in to comment.