mcavage/node-restify — pull request #228 by trentm (2012-10-11 23:04:35+00:00)
Title: include 'error' in the 'after' event and get audit logging to include that

Getting close to nice audit logging of an error looking like this:

```
[2012-10-11T22:56:54.734Z] INFO: imgapi/44739 on 0525989e-2086-4270-b960-41dd661ebd7d (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/audit.js:76 in audit): handled: 500 (3ms, audit=true, remoteAddress=10.2.207.2, remotePort=49091, _audit=true)
GET /stat/foo HTTP/1.1
user-agent: curl/7.27.0
host: 10.2.207.13
accept: application/json
content-type: application/json
--
HTTP/1.1 500 Internal Server Error
content-type: application/json
content-length: 51

{
"code": "InternalError",
"message": "could not stat"
}
--
InternalError: could not stat; caused by Error: ENOENT, stat 'foo'
at new Object.keys.forEach.module.exports.(anonymous function) (/opt/smartdc/imgapi/lib/errors.js:147:33)
at /opt/smartdc/imgapi/lib/app.js:215:25
at Object.oncomplete (fs.js:297:15)
Caused by: Error: ENOENT, stat 'foo'
```