Closed jonathanl-telenav closed 2 years ago
I don't have an easy test case for this, but checking for an empty payload like this should fix it:
writeResponse("{");
var payload = stripBrackets(toJson(response));
if (!payload.isEmpty())
{
writeResponse(payload + ",");
}
writeResponse(stripBrackets(toJson(errors)));
writeResponse("}");
Description
When the response object is null the response is invalid: