Why is this an issue?
Running cloud gateway list-routes produces an error instead of listing routes. This is the same pattern as container list, snapshot list, and cron list — API returns object, SDK expects array.
What is causing it?
The API endpoint returns a JSON object, but the SDK expects an array type []sdk.GatewayRoute. The Go json decoder fails with: json: cannot unmarshal object into Go value of type []sdk.GatewayRoute
How can it be solved?
Fix the API to return an array or update the SDK response type to match.
Category
Severity
Steps to reproduce
cloud gateway list-routes
# Output: Error: request failed: json: cannot unmarshal object into Go value of type []sdk.GatewayRoute
Why is this an issue?
Running
cloud gateway list-routesproduces an error instead of listing routes. This is the same pattern as container list, snapshot list, and cron list — API returns object, SDK expects array.What is causing it?
The API endpoint returns a JSON object, but the SDK expects an array type
[]sdk.GatewayRoute. The Go json decoder fails with:json: cannot unmarshal object into Go value of type []sdk.GatewayRouteHow can it be solved?
Fix the API to return an array or update the SDK response type to match.
Category
Severity
Steps to reproduce
cloud gateway list-routes # Output: Error: request failed: json: cannot unmarshal object into Go value of type []sdk.GatewayRoute