We have added additional catch block to handle exceptions of "CredentialUnavailableException," which are thrown due to managed identity issues.
In this catch block, we can return a 400 status code with complete stack as error message.
Created New OSS server with the latest changes
Managed Identity disabled for the Web app.
Run the Import request
Result - Getting 400 status code with error message ("import operation failed for reason: Managed Identity cannot access storage account.").
FHIR Team Checklist
Update the title of the PR to be succinct and less than 65 characters
Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
Description
We have added additional catch block to handle exceptions of "CredentialUnavailableException," which are thrown due to managed identity issues. In this catch block, we can return a 400 status code with complete stack as error message.
Related issues
Addresses issue AB#116962.
Testing
Created New OSS server with the latest changes Managed Identity disabled for the Web app. Run the Import request Result - Getting 400 status code with error message ("import operation failed for reason: Managed Identity cannot access storage account.").
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)