alphagov/email-alert-api — pull request #45 by kalleth (2014-11-05 13:08:28+00:00)
Title: Create SubscriberList if it exists on GovDelivery but not locally.

(This also includes a commit which adds pry to development and test environments. This is a personal preference and I'm happy to remove it if others feel strongly against)

[Trello ticket](https://trello.com/c/T2u2ZpGF/397-email-alert-api-should-handle-lists-existing-in-govdelivery-but-not-persisted-locally), [Pivotal ticket](https://www.pivotaltracker.com/s/projects/1110932/stories/82042838)

Previously, when we attempted to create a subscriber list, if the topic already exists with GovDelivery, the creation would fail "silently" and we'd get a bad "SubscriberList" record stored in the email-alert-api.

Now, it will recognise that the list already exists, and populate the data locally (using the list topics API) so that the error condition won't be encountered again.

In addition, if *any* error condition is encountered with GovDelivery, an exception will now be raised rather than it being swallowed silently.