It is always a good practice to rescue exceptions in Ruby, but be aware that, keep best the practices all times even when you are doing your rescue magic.Rescue someone unwilling to look after himself, and he will cling to you like a dangerous illness. --Mason Cooley
Let us take a look at the following code:
begin HTTParty.get(@url, :timeout => 5) rescue "Time out!" end