Fix tests for JSON error rendering

See gh-1762