I have a function that relies on database connection not being expired called pullData. I have a second function that initiates the database connection named initiateDb. I am looking for a neat way of wrapping pullData such that when it fails there's a call to initiateDb and then a retry on pullData. I can only come up with ways of doing with little readability.
pullData
initiateDb
1.4m articles
1.4m replys
5 comments
56.9k users