New test for empty JSON payload; more thorough error testing