Fixed bug where an exception was returned instead of raised when a hash was not found in the database.