alphagov/specialist-publisher — pull request #263 by kalleth (2014-09-29 12:19:02+00:00)
Title: Rescue errors when creating a topic in GovukDelivery

When we notify Govdelivery to send an e-mail on publish, we first ensure the topic exists in the govuk_delivery API.

However, when doing this, govuk_delivery first checks its local redis store to check if that topic already exists in GovDelivery. If not, it attempts to create it.

On preview, development and staging environments, the redis store is nuked periodically to sync data with production. This means that staging and preview lose knowledge of which topics have already been created in
GovDelivery, meaning govuk_delivery attempts to create topics which already exist.

govuk_delivery therefore attempts to create this topic with GovDelivery, and then fails.

We rescue this at this level rather than adjusting the function of govuk_delivery because we're intending to replace this with [alphagov/email-alert-api](https://github.com/alphagov/email-alert-api).

This fixes 500 errors experienced when publishing non-manual Specialist Documents.