Closed aome510 closed 1 year ago
Can confirm that I can reproduce this:
curl --request GET \
--url 'https://api.spotify.com/v1/me/player/recently-played?before=100' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header 'Content-Type: application/json'
{
"items" : [ ],
"next" : null,
"cursors" : null,
"limit" : 20,
"href" : "https://api.spotify.com/v1/me/player/recently-played?before=100"
}
Describe the bug The
cursors
field in the cursor-based page object can be null if the page returned by the request is empty. Assuming it is non-nullable makes deserializing the response object panic.To Reproduce Steps to reproduce the behavior:
Expected behavior Found the
cursors
field in the response to be null.