Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The nsxt resources do not behave correctly during the refresh cycle,
if the described resource has vanished. Here an error 404 is reported
and terraform stops processing (instead of recreating the missing resource).
This is caused by a general implementation error in nearly all
resources based on a wrong assumption about the behaviour of the go SDK.
It assumes that http status codes are never reported as errors, but
all the SDK functions return an error if the status code is above 300.
Therefore the order of the error handling in the read functions of
the resources is wrong.
Instead of
the correct error handling must always be
In three cases the order was already fixed, but in two of these cases
the nil pointer check was missing, causing a NPE for http request
execution errors.