Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMWare fault details #2519

Open
24pravin opened this issue Jul 14, 2021 · 3 comments
Open

VMWare fault details #2519

24pravin opened this issue Jul 14, 2021 · 3 comments

Comments

@24pravin
Copy link

24pravin commented Jul 14, 2021

Please refer https://github.com/vmware/govmomi/blob/master/vim25/soap/error.go and class

type soapFaultError struct {
fault *Fault
}

Above class is private to govmomi/vim25/soap package. Therefore even VMWare API returns detail error description i.e fault.Detail.Fault. One can not log this information or not able to access the details. Therefore debugging of issue become difficult.

Ask:
i) The above class and attribute fault should be visible out side the govmomi package so that one can log the details error description given by VMWare API.
ii) Or there should be better error handling so that caller should know more details about actual issue.

@github-actions
Copy link
Contributor

Howdy 🖐   24pravin ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

@dougm
Copy link
Member

dougm commented Jul 15, 2021

You can use these helpers to get the details:

govmomi/vim25/soap/error.go

Lines 109 to 116 in 7822b34

func IsSoapFault(err error) bool {
_, ok := err.(soapFaultError)
return ok
}
func ToSoapFault(err error) *Fault {
return err.(soapFaultError).fault
}

@github-actions
Copy link
Contributor

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants