Calls to GetNodeRenderedConfigDiff() may return error due to 404 from the API.
964 introduced a change which made these errors not fatal for the data source. We want to just return a null incremental config in those cases.
Unfortunately, the incremental config is returned via a *apstra.RenderDiff (a pointer), which is nil on 404. Because 964 causes us to not return, we go on to dereference a value within that nil struct pointer, leading to a crash.
This PR tightens up the preceding code a bit (disambiguates some stuff no longer needed since #964) and checks the pointer before attempting to dereference the config diff.
Calls to
GetNodeRenderedConfigDiff()
may return error due to 404 from the API.964 introduced a change which made these errors not fatal for the data source. We want to just return a
null
incremental config in those cases.Unfortunately, the incremental config is returned via a
*apstra.RenderDiff
(a pointer), which isnil
on 404. Because 964 causes us to not return, we go on to dereference a value within that nil struct pointer, leading to a crash.This PR tightens up the preceding code a bit (disambiguates some stuff no longer needed since #964) and checks the pointer before attempting to dereference the config diff.
Closes #967