Index: src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java	(revision 5616)
+++ src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java	(revision 5617)
@@ -437,6 +437,7 @@
         catch(Exception e)
         {
             String msg = "Could not get logs from CrudService: " + e.getMessage();
+            response.setStatus(500);
             ServiceFailure sf = new ServiceFailure("1490", msg);
             logMetacat.error(msg);
             e.printStackTrace();
@@ -666,26 +667,32 @@
                 }
                 catch(InvalidToken it)
                 {
+                    response.setStatus(500);
                     serializeException(it, out); 
                 }
                 catch(ServiceFailure sf)
                 {
+                    response.setStatus(500);
                     serializeException(sf, out); 
                 }
                 catch(NotAuthorized na)
                 {
+                    response.setStatus(500);
                     serializeException(na, out); 
                 }
                 catch(NotFound nf)
                 {
+                    response.setStatus(500);
                     serializeException(nf, out); 
                 }
                 catch(NotImplemented ni)
                 {
+                    response.setStatus(500);
                     serializeException(ni, out); 
                 }
                 catch(Exception e)
                 {
+                    response.setStatus(500);
                     System.out.println("Error with Crud.get().  " +
                             "If this is an 'Exception producing data' error, " +
                             "go to CrudService.get() for better debugging.  " +
@@ -784,17 +791,21 @@
                 }
             }
         } catch (BaseException e) {
+                response.setStatus(500);
                 serializeException(e, out);
         } catch (IOException e) {
             e.printStackTrace();
+            response.setStatus(500);
             ServiceFailure sf = new ServiceFailure("1030", 
                     "IO Error in ResourceHandler.getObject: " + e.getMessage());
             serializeException(sf, out); 
         } catch(NumberFormatException ne) {
+            response.setStatus(500);
             InvalidRequest ir = new InvalidRequest("1030", "Invalid format for parameter: " + ne.getMessage());
             serializeException(ir, out);
         } catch (Exception e) {
             e.printStackTrace();
+            response.setStatus(500);
             ServiceFailure sf = new ServiceFailure("1030", 
                     "Exception " + e.getClass().getName() + " raised while handling listObjects request: " + 
                     e.getMessage());
@@ -872,8 +883,10 @@
                 throw new ServiceFailure("1190", "Failed to serialize SystemMetadata: " + e.getMessage());
             }
         } catch (BaseException e) {
+            response.setStatus(500);
                 serializeException(e, out);
         } catch (IOException e) {
+            response.setStatus(500);
             ServiceFailure sf = new ServiceFailure("1030", 
                     "Error in ResourceHandler.getSystemMetadataObject: " + e.getMessage());
             serializeException(sf, out);
@@ -1016,7 +1029,7 @@
         InputStream object = null;
         InputStream sysmeta = null;
         String s = IOUtils.toString(is);
-        System.out.println("mime: " + s);
+        //System.out.println("mime: " + s);
         //figure out what the boundary marker is
         String searchString = "boundary=";
         int searchStringIndex = s.indexOf(searchString);
@@ -1045,8 +1058,8 @@
         h.put("object", object);
         h.put("systemmetadata", sysmeta);
                 
-        System.out.println("o: \"" + o + "\"");
-        System.out.println("sm: \"" + sm + "\"");
+        //System.out.println("o: \"" + o + "\"");
+        //System.out.println("sm: \"" + sm + "\"");
         return h;
     }
     
@@ -1146,30 +1159,41 @@
                 throw new InvalidRequest("1000", "Operation must be create or update.");
             }
         } catch (NotAuthorized e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (InvalidToken e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (ServiceFailure e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (IdentifierNotUnique e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (UnsupportedType e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (InsufficientResources e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (InvalidSystemMetadata e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (NotImplemented e) {
+            response.setStatus(500);
             serializeException(e, out);
         } catch (InvalidRequest e) {
+            response.setStatus(500);
             serializeException(e, out);
         } /*catch (MessagingException e) {
             ServiceFailure sf = new ServiceFailure("1000", e.getMessage());
             serializeException(sf, out);
         }*/ catch (IOException e) {
+            response.setStatus(500);
             ServiceFailure sf = new ServiceFailure("1000", e.getMessage());
             serializeException(sf, out);
         } catch (JiBXException e) {
+            response.setStatus(500);
             e.printStackTrace(System.out);
             InvalidSystemMetadata ism = new InvalidSystemMetadata("1080", e.getMessage());
             serializeException(ism, out);
