Is there a way to catch any type of error the Ruby/Rails encounters?
I am making a network request. What I have seen so far is, it can return 404, timeout or even any empty response object?
I have handled them individually, it is not DRY, but is there a way to handle all these and those which I have not seen yet gracefully?
Many times even when the response object is analysed, sometimes it may not contain what I am looking for. Sure I can handle them individually.
I am curious to know if it is possible to define a use case to work with, everything apart from it, which I have not imagined, is just thrown an exception and does not break my application.
Is generic error handling possible in Ruby?