> Hm.. I wonder if some of this (parsing the body, producing a nice body, producing the dictionary that is done in details should be done in APIError, since APIError knows what to do with itself, rather than UpstreamError having to know everything about APIError?

`APIError` does not know the upstream system it is connected to and hence cannot parse body specific to that system. `UpstreamError` has that knowledge. 

> For instance, the more nicely formatted message string could just be the API error message "message" string instead, maybe the dictionary can be produced by a helper function?

It seems like a nice idea. However, "message" is also generic `Exception` property. So, I am not sure if it will conflict with that. And again, `APIError` will need to know the system it is connecting to, unless it can have a generic parser that looks for any "message" in the body json and stores it?