Closed zs-codex closed 2 years ago
Makes sense. This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
It is a generic issue in paging library which throws error could not retrieve payload from response
if there is no result. I am getting it on ListPhoneNumber()
api.
@mwajeeh Yup we are aware of it. It's in the backlog being prioritized.
+1, also seeing this on PlayerStreamer and MediaProcessor list resources.
I believe I tracked down this problem. It has to do with response types having omitempty
.
An example of this can be seen on the ListCallResponse. If omitempty
is removed, the Calls
struct will have an empty slice value and will be present when the response is marshaled in toMap. The page_util.go code will detect the empty slice and append it to the data
slice, and not cause an error.
If you look at an empty json response to the Calls
endpoint, the "calls": []
empty array indicates the field has empty data and not null data. Therefore I think that omitempty
is incorrect and the response field should not be nullable (in the OAI spec?).
{
"first_page_uri": "/2010-04-01/Accounts/ACxx/Calls.json?EndTime%3C=2021-11-27T10%3A22%3A51+00%3A00&StartTime%3E=2021-11-27T16%3A22%3A51+00%3A00&PageSize=20&Page=0",
"end": 0,
"calls": [],
"previous_page_uri": null,
"uri": "/2010-04-01/Accounts/ACxx/Calls.json?EndTime%3C=2021-11-27T10%3A22%3A51+00%3A00&StartTime%3E=2021-11-27T16%3A22%3A51+00%3A00&PageSize=20&Page=0",
"page_size": 20,
"start": 0,
"next_page_uri": null,
"page": 0
}
Issue Summary
The ConversationsV1 REST API for
ListServiceConversationMessage()
returns the following error if no messages exist in the conversation:| could not retrieve payload from response
However, we would expect the returned result to be either
Steps to Reproduce
Code Snippet
Exception/Log
Technical details: