Ensure errors include document representation

Errors now include either the document JSON payload from RabbitMQ message
or the parsed JSON from the system.

This allows us to both analyse "bad" messages running in the RabbitMQ queue and messages that the system doesn't consider valid internally (for example, correctly formed JSON that is missing required keys)