Index: trunk/Nebulous-Server/Changes
===================================================================
--- trunk/Nebulous-Server/Changes	(revision 17687)
+++ trunk/Nebulous-Server/Changes	(revision 17690)
@@ -2,4 +2,5 @@
 
 0.10
+    - cleanup error handling in Nebulous::Server::stat_object()/find_objects()
     - update Nebulous::Server::lock_object()/unlock_object() fault strings
     - cleanup database error handling: make sure queries are ->finished before
Index: trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 17687)
+++ trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 17690)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004-2008  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.69 2008-05-15 00:36:41 jhoblitt Exp $
+# $Id: Server.pm,v 1.70 2008-05-15 02:50:03 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -860,5 +860,5 @@
     unless ($pattern) {
         $log->debug( "leaving" );
-        return [];
+        $log->logdie("no keys found");
     }
 
@@ -880,5 +880,5 @@
     $log->logdie("database error: $@") if $@;
 
-    $log->debug( "no keys found" ) unless ( scalar @keys );
+    $log->logdie("no keys found") unless ( scalar @keys );
 
     $log->debug( "leaving" );
@@ -1058,4 +1058,7 @@
         {
             type        => SCALAR,
+            callbacks   => {
+                'is valid object key' => sub { $self->_is_valid_object_key($_[0]) },
+            },
         },
     );
@@ -1066,7 +1069,4 @@
 
     $log->debug("entered - @_");
-
-    # does this key exist?
-    return unless ($self->_is_valid_object_key($key));
 
     # ignore volume
@@ -1079,5 +1079,5 @@
 
         unless ($rows == 1) {
-            $log->debug("no storage object found");
+            $log->logdie("no storage object found");
         }
 
