-
Notifications
You must be signed in to change notification settings - Fork 5
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
Expose SMB share and NFS export error message #41
Conversation
2eb79b9
to
8c41363
Compare
run e2e test |
resp.Diagnostics.AddError("Error transform nfs export datasource plan", | ||
message) | ||
resp.Diagnostics.AddError("Error reading smb share datasource plan", | ||
fmt.Sprintf("Could not list smb shares with error: %s", err.Error())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not list nfs export with error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
) | ||
errStr := constants.GetNfsExportErrorMsg + "with error: " | ||
message := helper.GetErrorString(err, errStr) | ||
response.Diagnostics.AddError("Error creating nfs export ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
fmt.Sprintf("Could not recognize nfs export ID: %s with error: %s ", | ||
request.ID, err.Error()), | ||
) | ||
errStr := constants.GetSmbShareErrorMsg + "with error: " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetNfsExportErrorMsg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
fmt.Sprintf("Could not remove nfs export ID: %d with error: %s ", | ||
exportID, err.Error()), | ||
) | ||
errStr := constants.DeleteSmbShareErrorMsg + "with error: " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeleteNfsExportErrorMsg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Rechecked all modified files
Export error detail for OpenAPI error
8c41363
to
ee0fe62
Compare
run e2e test |
run e2e test |
Description
Export error detail for OpenAPI error
Now output the error message detail
GitHub Issues
List the GitHub issues impacted by this PR:
ISSUE TYPE
RESOURCE OR DATASOURCE NAME
SMB share
NFS export
OUTPUT
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration