alphagov/publisher — comment on commit 6c9a79eddd49f267e4e1015577d570480e5b96ea
File:  line 0
By craigw:

I don't think we should be handling such a specific problem in a remote client; I'm happy with handling protocol exceptions in general - rescue at the end of the method, log the error, do something to make it obvious that it couldn't denormalise - but if we're trying to rescue based on the document we serve then we should consider what happens if we're served slugs that are invalid, unrecognised kinds, duplicate names and slugs, sort keys that make no sense, etc. We end up having N places where we validate the document, Panopticon and all the client code that talks to it.

Willing to be talked into another way of thinking though ;)