DoSomething/ds-mdata-responder — pull request #250 by jonuy (2014-10-22 15:27:42+00:00)
Title: Adding more logging info to mobile commons logs when status code != 200

#### What's this PR do?
When `mobilecommons.*` calls return with a status code != 200, we'll now also be logging the body and stacktrace.

#### What I tested
I tested by delivering tips to my phone with the `ds/tips` endpoint and temporarily logging `statusCode: 200` responses in the same way we're logging errors. Then verified those logs showed up in the db.

No idea how the != 200 errors are happening, so I couldn't get an error to trigger for my tests.

#### What's it look like
Kinda weird:
```
{
"_id": ObjectId("5447cb086e1245121a31c225"),
"level": "error",
"message": "SUCCESS mobilecommons.optin with code: 200 | body: OK! (To have your browser automatically redirect, add a well-formed redirect_to= parameter to your post) | stack: Error\n at Request._callback (/Users/juy/projects/DoSomething/ds-mdata-responder/mobilecommons/mobilecommons.js:140:48)\n at Request.self.callback (/Users/juy/projects/DoSomething/ds-mdata-responder/node_modules/request/request.js:121:22)\n at Request.emit (events.js:98:17)\n at Request. (/Users/juy/projects/DoSomething/ds-mdata-responder/node_modules/request/request.js:978:14)\n at Request.emit (events.js:117:20)\n at IncomingMessage. (/Users/juy/projects/DoSomething/ds-mdata-responder/node_modules/request/request.js:929:12)\n at IncomingMessage.emit (events.js:117:20)\n at _stream_readable.js:929:16\n at process._tickCallback (node.js:419:13)",
"meta": {

},
"timestamp": ISODate("2014-10-22T15:19:36.965Z")
}
```

The stacktrace is in a single string, so that's less than ideal. But at least the info's there.

#### What are the relevant tickets?
#249