Added logging to 4xx status handlers
adam [Fri, 20 Oct 2006 02:15:19 +0000 (02:15 +0000)]
Changelog
lib/Catalyst/Controller/REST.pm

index 31cffc2..36342c0 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -10,4 +10,5 @@ Wed Oct 18 17:29:07 PDT 2006 (adam)
 Thu Oct 19 16:04:33 PDT 2006 (adam)
        Converted error helpers to return an object instead of plain-text.  It's
          a more consistent model than a text/plain error message.
+       Added logging to 4xx status handlers
 
index 321037a..91434b5 100644 (file)
@@ -71,6 +71,7 @@ sub status_bad_request {
     );
 
     $c->response->status(400);
+    $c->log->debug("Status Bad Request: " . $p{'message'});
     $self->_set_entity($c, { error => $p{'message'} });
     return 1;
 }
@@ -85,6 +86,7 @@ sub status_not_found {
     );
 
     $c->response->status(404);
+    $c->log->debug("Status Not Found: " . $p{'message'});
     $self->_set_entity($c, { error => $p{'message'} });
     return 1;
 }