rackerlabs/otter — pull request #461 by cyli (2013-11-15 18:22:18+00:00)
Title: Auto 796 DetailedException (WIP)

Work in progress. Want to see how this works before putting it up for review formally, but this is what I'm thinking right now.

Trying to figure out how to include structured fault data, so that for relevant errors, we can easily do something like:

"fault": {
"code" : 403,
"message" : "Maximum group size hit",
"details" : {
"cooldown_remaining": 20
}
}

Figuring the easiest way to do that is to make every exception we care about logging to the user have a `details` field with structured data, and the error message can just be formatted with the structured data as we do in the logs.

(We can filter out stuff we don't care about, like tenant_id, scaling_group_id, etc. that will be in the otter log message anyway).