Mishandling of total_count value in instance API make the instance API unusable #555
Labels
bug
Something isn't working
instance
Instance issues, bugs and feature requests
priority:highest
Bugs filled by customers, security issues
On python 3.12, version 2.3.1 of the scaleway package
There seems to be a lot of instance api functions having issues with the
total_count
value "returned", I checked for at least theses but there is probably more:list_servers_types
list_servers
list_servers_all
get_server_types_availability
Checking the scaleway-go-sdk, it seems that for the instance API it is checking the "X-Total-Count"
https://github.com/scaleway/scaleway-sdk-go/blob/a057dbf8e7a1d8fabcfbdc7ba09416568a15fc61/scw/client.go#L255
In the function, after the http request is made I printed
res.headers
just beforeres.json()
is sent to the Marshalling, and I just saw that indeed a "x-total-count" headers is present with the correct value (at least forget_server_types_availability
which I tested).Could you fix the handling of this value for the whole instance API? As function calls crashes otherwise, it seems like a serious issue.
Could it also be made clear in the Readme that this package is supposed to be an alpha and is not production-ready ?
The text was updated successfully, but these errors were encountered: