Checks that a 2xx answer really is the Data API envelope ({ response: {...}, messages: [...] })
and returns it. Anything else (an HTML page, an empty body, an array, cut-off JSON) becomes one
clear error instead of a Cannot read properties of undefined later. Claris documents that
status 200 "doesn't indicate response errors", so a non-zero messages[0].code is raised too.
Checks that a 2xx answer really is the Data API envelope (
{ response: {...}, messages: [...] }) and returns it. Anything else (an HTML page, an empty body, an array, cut-off JSON) becomes one clear error instead of aCannot read properties of undefinedlater. Claris documents that status 200 "doesn't indicate response errors", so a non-zeromessages[0].codeis raised too.