Index: /branches/eam_branches/ipp-20191011/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- /branches/eam_branches/ipp-20191011/Nebulous/lib/Nebulous/Client.pm	(revision 40990)
+++ /branches/eam_branches/ipp-20191011/Nebulous/lib/Nebulous/Client.pm	(revision 40991)
@@ -418,5 +418,9 @@
 
         if (defined $locations) {
+	    # XXX this is an example of passing 'find_invalid' to find_instances
             my $instances = $self->find_instances($key, undef, 'find them all');
+            if (not defined $instances) {
+                die "no instances";
+            }
             if (scalar @$instances == 1) {
                 # only one instance nothing to do
@@ -448,5 +452,4 @@
             }
         }
-
     };
     if ($@) {
@@ -663,4 +666,17 @@
     if ($response->fault) {
         $self->set_err($response->faultstring);
+
+	## invalid object key
+        if ($response->faultstring =~ /is valid object key/) {
+            $log->debug( "leaving" );
+	    die "invalid key $key, fails 'is valid object key' test\n";
+        }
+
+	## invalid object key
+        if ($response->faultstring =~ /xattr is in user. namespace/) {
+            $log->debug( "leaving" );
+	    die "invalid xattr key $name : fails 'xattr is in user. namespace' test\n";
+        }
+
         $log->logdie("unhandled fault - ", $self->err);
     }
@@ -690,4 +706,22 @@
     if ( $response->fault ) {
         $self->set_err($response->faultstring);
+
+	## invalid object key
+        if ($response->faultstring =~ /is valid object key/) {
+            $log->debug( "leaving" );
+	    die "invalid key $key, fails 'is valid object key' test\n";
+        }
+
+	## invalid xattr key (not in user. namespace)
+        if ($response->faultstring =~ /xattr is in user. namespace/) {
+            $log->debug( "leaving" );
+	    die "xattr $name is invalid : xattr is in user. namespace\n";
+        }
+
+	## invalid xattr key
+        if ($response->faultstring =~ /user\..*? does not exist/) {
+            $log->debug( "leaving" );
+	    die "xattr key $name not found : xattr $name does not exist\n";
+        }
         $log->logdie("unhandled fault - ", $self->err);
     }
@@ -747,4 +781,23 @@
     if ( $response->fault ) {
         $self->set_err($response->faultstring);
+
+	## invalid object key
+        if ($response->faultstring =~ /is valid object key/) {
+            $log->debug( "leaving" );
+	    die "invalid key $key, fails 'is valid object key' test\n";
+        }
+
+	## invalid xattr key (not in user. namespace)
+        if ($response->faultstring =~ /xattr is in user. namespace/) {
+            $log->debug( "leaving" );
+	    die "xattr $name is invalid : xattr is in user. namespace\n";
+        }
+
+	## invalid xattr key
+        if ($response->faultstring =~ /user\..*? does not exist/) {
+            $log->debug( "leaving" );
+	    die "xattr key $name not found : xattr $name does not exist\n";
+        }
+
         $log->logdie("unhandled fault - ", $self->err);
     }
@@ -871,4 +924,5 @@
     if ( $response->fault ) {
         $self->set_err($response->faultstring);
+
         # check to see if this failure is because $key doesn't exist
         if ($response->faultstring =~ /is valid object key/) {
@@ -878,4 +932,14 @@
         # key is valid but no instances are on the specified volume
         if ($response->faultstring =~ /no instances on storage volume/) {
+            $log->debug( "leaving" );
+            return;
+        }
+        # check to see if this failure is volume is unknown
+        if ($response->faultstring =~ /is not a valid volume name/) {
+            $log->debug( "leaving" );
+            return;
+        }
+        # key is valid but no instances are on the specified volume
+        if ($response->faultstring =~ /no instances available for key/) {
             $log->debug( "leaving" );
             return;
@@ -972,4 +1036,5 @@
 
 
+## this is used by PS:IPP:Config nebulous functions
 sub find
 {
@@ -1014,5 +1079,4 @@
     return $path;
 }
-
 
 sub open
@@ -1127,4 +1191,5 @@
     my $locations;
     if ($invalid) {
+	# XXX this is an example of passing 'find_invalid' to find_instances
 	$locations = $self->find_instances( $key, 'any', 'find them all');
     }
