>APIError does not know the upstream system it is connected to and hence cannot parse body specific to that system. UpstreamError has that knowledge.

The current implementation of `UpstreamError` does not seem to special case parsing based on what type of system it is - doesn't it just grab the first key in the body, and then grab the message?

>However, "message" is also generic Exception property. So, I am not sure if it will conflict with that.

Well, message wouldn't be set explicitly to override Exception's message after it was already created, but APIError already generates that message in the `__init__`: it subclasses Exception, and passes the string that becomes the message:  https://github.com/rackerlabs/otter/blob/upstream-err/otter/util/http.py#L123

```
>>> from otter.util.http import APIError
>>> a = APIError(404, '{"some stuff": "some other stuff"}', {})
>>> a.message
'API Error code=404, body=\'{"some stuff": "some other stuff"}\', headers={}'
>>> str(a)
'API Error code=404, body=\'{"some stuff": "some other stuff"}\', headers={}'
```

I was thinking that maybe instead of the message being:  "API Error code=404....", `APIError` in `__init__` could perform the same functionality as is done in `_parse_message`, and pass the `apierr_message` as the argument to Exception?   Such as:

```
class APIError(Exception):
    def __init__(self, code, body, headers=None):
        try:
            _tmp = json.loads(body)
            body_msg = _tmp[_tmp.keys()[0]]['message']
        except:
            body_msg = "Unexpected format for API body"

        super(APIError, self).__init__('{0} - {1}'.format(code, body_msg))
        self.code = code
        self.body = body
        self.headers = headers

    def details(self):
        return {'code': self.code, 'body': self.body, 'headers': self.headers}
```

And then there wouldn't be a need for a check if it's an APIError - it can always just be `msg += str(error)`, because if it's an APIError the `str` will already formatted how we want it here.  `UpstreamError` will still be the thing that knows about the system, but the parts that APIError can synthesize don't need the system.  The system gets added to `UpstreamError`'s message no matter if it's `APIError` or some other type of error.