error message now always produce JSON output