OpenURI error handling

I’m getting a 404 error occasionally when using the open method from
OpenURI. I’m primarily using the command inside of a helper and I’m
not sure how to do any error handling when that happens.

Any help would be greatly appreciated.
Thanks,
Tal