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

Better exception handling #4745

Merged
merged 9 commits into from
Dec 17, 2024
Merged

Better exception handling #4745

merged 9 commits into from
Dec 17, 2024

Conversation

fhibf
Copy link
Contributor

@fhibf fhibf commented Dec 6, 2024

Description

Adding better exception handling for a few situations:

  • Extending PreconditionFailedException to support inner exceptions.
  • Raising PreconditionFailedException when an operation fails due a partition reaching 20GB. That should replace HTTP500s with HTTP400s, indicating to customer that a failure on their end caused the issue.
  • Adding hew FHIR Exception type called TransactionFailureException to replace odd InvalidOperationExceptions raised in case of Cosmos DB transaction failures.
  • Adding more logs for when FHIR profiles are refreshed by BundleHandler. Additionally, logging for how long the refresh ran and handling cases when the refresh fails. Fails during the profile refresh should not affect the response of bundles.
  • Handling null reference exceptions at Bundle SanitizeString. I noticed those errors recently, and I want to avoid the noise caused by these errors. These errors are not currently affecting the execution of bundles.

Related issues

AB#134896.

Testing

Describe how this change was tested.

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

@fhibf fhibf requested a review from a team as a code owner December 6, 2024 22:23
@fhibf fhibf added Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs labels Dec 11, 2024
@fhibf fhibf added this to the S156 milestone Dec 11, 2024
@fhibf fhibf added the Bug Bug bug bug. label Dec 11, 2024
LTA-Thinking
LTA-Thinking previously approved these changes Dec 12, 2024
@fhibf fhibf merged commit 946142e into main Dec 17, 2024
47 checks passed
@fhibf fhibf deleted the user/fernfe/exceptioncontrol branch December 17, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants