alphagov/stagecraft — pull request #133 by paulfurley (2014-05-13 15:56:16+00:00)
Title: Improve error messages shown from Backdrop

- Handle previously uncaught `ConnectionError`
- Make 4 new subclasses of Backdrop error:
- BackdropAuthenticationError
- BackdropConnectionError
- BackdropBadRequestError
- BackdropUnknownError
- Factor out the function which sends & handles errors so it's common
between create & delete requests.
- Extract and use the error message from the Backdrop response JSON if
available.

https://www.pivotaltracker.com/story/show/65645322

[Delivers #65645322]