vmware / vsphere-automation-sdk-go

Go programming language SDK (Beta) for VMC. NSX-T and vSphere services will be added soon.
Other
32 stars 23 forks source link

Don't deserialize response after endpoint failure #9

Closed briantopping closed 2 years ago

briantopping commented 2 years ago

A non-2xx response assumes that the response body is not deserializable. Avoid a panic by returning a better error message instead of a panic from failing to deserialize.

Signed-off-by: Brian Topping brian@coglative.com

ghost commented 2 years ago

Please open an Issue. We don't normally accept pull requests. You mention a panic - could you include the panic stack trace ? Also please describe how to reproduce the problem.