Skip to content
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

Read operation in catalystcenter_network_profile has incorrect url encoding #166

Open
jolstorn opened this issue Jan 14, 2025 · 0 comments
Assignees

Comments

@jolstorn
Copy link

Having profile names with whitespace result in error:

2025-01-13T18:52:08.834+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: "Switching Profile devhf": Beginning Read: tf_provider_addr=registry.terraform.io/CiscoDevNet/catalystcenter @caller=github.com/CiscoDevNet/terraform-provider-catalystcenter/internal/provider/resource_catalystcenter_network_profile.go:178 @module=catalystcenter tf_req_id=0d18e459-2084-1cf0-350c-97cf6f4d1520 tf_resource_type=catalystcenter_network_profile tf_rpc=ReadResource timestamp="2025-01-13T18:52:08.834+0100"
2025-01-13T18:52:08.834+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: 2025/01/13 18:52:08 [DEBUG] HTTP Request: GET, https://100.68.0.71/api/v1/siteprofile/Switching+Profile+devhf?populated=true, {}
2025-01-13T18:52:08.847+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: 2025/01/13 18:52:08 [DEBUG] HTTP Response: {"response":{"errorCode":"BadRequest","message":"Invalid character (character ‘+‘ is not allowed)","detail":"Invalid character found in request, please update request and resend"},"version":"1.0"}
2025-01-13T18:52:08.847+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: 2025/01/13 18:52:08 [DEBUG] Begining backoff method: attempts 0 on 3
2025-01-13T18:52:08.847+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: 2025/01/13 18:52:08 [TRACE] Starting sleeping for 2s
2025-01-13T18:52:10.848+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: 2025/01/13 18:52:10 [DEBUG] Exit from backoff method with return value true
2025-01-13T18:52:10.848+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: 2025/01/13 18:52:10 [ERROR] HTTP Request failed: StatusCode 400
2025-01-13T18:52:10.848+0100 [DEBUG] provider.terraform-provider-catalystcenter_v0.1.18: 2025/01/13 18:52:10 [DEBUG] Exit from Do method: GET, https://100.68.0.71/api/v1/siteprofile/Switching+Profile+devhf?populated=true
2025-01-13T18:52:10.848+0100 [ERROR] provider.terraform-provider-catalystcenter_v0.1.18: Response contains error diagnostic: tf_req_id=0d18e459-2084-1cf0-350c-97cf6f4d1520 tf_resource_type=catalystcenter_network_profile diagnostic_detail="Failed to retrieve object (GET), got error: HTTP Request failed: StatusCode 400, {\"response\":{\"errorCode\":\"BadRequest\",\"message\":\"Invalid character (character ‘+‘ is not allowed)\",\"detail\":\"Invalid character found in request, please update request and resend\"},\"version\":\"1.0\"}" diagnostic_severity=ERROR diagnostic_summary="Client Error" tf_proto_version=6.7 tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov6/internal/diag/diagnostics.go:58 @module=sdk.proto tf_provider_addr=registry.terraform.io/CiscoDevNet/catalystcenter timestamp="2025-01-13T18:52:10.848+0100"
2025-01-13T18:52:10.849+0100 [ERROR] vertex "module.core_templates.catalystcenter_network_profile.this[\"Switching Profile devhf\"]" error: Client Error
2025-01-13T18:52:10.849+0100 [ERROR] vertex "module.core_templates.catalystcenter_network_profile.this (expand)" error: Client Error
@kuba-mazurkiewicz kuba-mazurkiewicz self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants