Skip to content

Commit 7d36d0e

Browse files
authored
fix: frontend o11y faroEndpointUrl property access (#2378)
* fix: frontend o11y faroEndpointUrl property access * lint
1 parent 7dfcd88 commit 7d36d0e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/resources/frontendo11y/data_source_frontend_o11y_app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ func (r *datasourceFrontendO11yApp) getFrontendO11yAPIURLForRegion(ctx context.C
108108
}
109109

110110
region := resp.Items[0]
111-
if val, ok := region.FormattedApiStackRegionAnyOf.AdditionalProperties["faroEndpointURL"]; ok {
111+
if val, ok := region.FormattedApiStackRegionAnyOf.AdditionalProperties["faroEndpointUrl"]; ok {
112112
if strVal, ok := val.(string); ok {
113113
return strVal, nil
114114
}
115115
}
116116

117-
return "", fmt.Errorf("faroEndpointURL not found for region %q", regionSlug)
117+
return "", fmt.Errorf("faroEndpointUrl not found for region %q", regionSlug)
118118
}
119119

120120
func (r *datasourceFrontendO11yApp) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {

internal/resources/frontendo11y/resource_frontend_o11y_app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ func (r *resourceFrontendO11yApp) getFrontendO11yAPIURLForRegion(ctx context.Con
166166
}
167167

168168
region := resp.Items[0]
169-
if val, ok := region.FormattedApiStackRegionAnyOf.AdditionalProperties["faroEndpointURL"]; ok {
169+
if val, ok := region.FormattedApiStackRegionAnyOf.AdditionalProperties["faroEndpointUrl"]; ok {
170170
if strVal, ok := val.(string); ok {
171171
return strVal, nil
172172
}
173173
}
174174

175-
return "", fmt.Errorf("faroEndpointURL not found for region %q", regionSlug)
175+
return "", fmt.Errorf("faroEndpointUrl not found for region %q", regionSlug)
176176
}
177177

178178
func (r *resourceFrontendO11yApp) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {

0 commit comments

Comments
 (0)