microsoft / terraform-provider-power-platform

Power Platform Terraform Provider
https://registry.terraform.io/providers/microsoft/power-platform/latest/docs
MIT License
35 stars 13 forks source link

adding additional check for default currency request #374

Closed mawasile closed 4 months ago

mawasile commented 4 months ago

This pull request primarily addresses error handling and reporting in the Power Platform API client and related services. The changes involve the addition of a new error code ERROR_ENVIRONMENT_URL_NOT_FOUND, and checks for empty environment URLs in various methods across different services. If an environment URL is found to be empty, the new error is raised with a helpful message. This error is then handled in the Read methods of EnvironmentResource and EnvironmentsDataSource, where a warning is added to the diagnostics only if the error is not ERROR_ENVIRONMENT_URL_NOT_FOUND.

Here are the most important changes:

New error code:

Error handling in API client and services:

Error handling in data sources and resources:

Imports: