Thanks Jan for all your help.
It's now working as expected with that workaround.
For those of you using the code from Github to create the Render Request, it's worth noting the following change I made to resolve the issue:
public class RenderRequest
{
public RenderRequest()
{
Template = new Template();
Options = new RenderOptions()
{
// use this if you want to see what you are creating from your request
Reports = new ReportsOptions
{
Save = true
}
// it makes sense to enable this always (WRONG!)
// switch this off for now as current bug can cause 502 bad gateway
//Debug = new DebugOptions()
//{
// LogsToResponseHeader = true
//}
};
}
public Template Template { get; set; }
public object Data { get; set; }
public RenderOptions Options { get; set; }
public object Overwrites { get; set; }
}