Adjust mapping of LB API response when private network only field is … (#477)

* Adjust mapping of LB API response when private network only field is null

* Improve comment

Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>

---------

Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>
This commit is contained in:
João Palet 2024-07-23 11:37:57 +01:00 committed by GitHub
parent 40ce90999b
commit af7d789945
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 160 additions and 16 deletions

View file

@ -330,7 +330,7 @@ func (r *loadBalancerDataSource) Read(ctx context.Context, req datasource.ReadRe
}
// Map response body to schema
err = mapFields(lbResp, &model)
err = mapFields(ctx, lbResp, &model)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading load balancer", fmt.Sprintf("Processing API payload: %v", err))
return