Introduced response error hierarchy

In order to be able to distinguish between types of error more easily,
an error type hierarchy was introduced. The response itself is embedded
within the errors with helpers for accessing the status and body more
easily.

This also introduces a special case for 401 Unauthorized.
Merge branch 'better-errors' into custom