projecthydra/rubydora — pull request #20 by dbrower (2013-04-08 20:58:26+00:00)
Title: Make Repository#search handle 401 errors gracefully

The Fedora search returns all objects which match the given query regardless of whether the searcher has permission to read it. Unfortunately, in our repository some objects are not retrievable because of XACML restrictions, and when rubydora tries to load such an object, RestClient raises a 401 exception, when then terminates the search.

This patch catches the RestClient exception and has the search move on to the next object. Any digital object that generates a 401 error in a search is silently skipped.