Change to json return on custom reports

Also added raising of errors on non-200 returns.