omxhealth / drugbank-sample-apps

Sample apps for the DrugBank API
The Unlicense
5 stars 1 forks source link

Don't rescue without specifying an exception type #8

Closed cknoxrun closed 4 years ago

cknoxrun commented 4 years ago

On this line: https://github.com/omxhealth/drugbank-sample-apps/blob/808160e07fcd83e344b24c81d780c6dd67738780/ruby/app.rb#L13

There is a rescue without specifying the exception type. This will rescue any exception, which may make it very hard to debug if something else goes wrong. I would recommend changing this to use File.exist? instead of a rescue block.