Log errors when given invalid JSON documents from the API