Adding handling for SqlTruncate errors #2553
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adding a check for SqlTruncate Exceptions and tests. In particular this will catch SqlTruncate exceptions for Decimal type based on the specified precision and scale.
The following additional file changes were made based on IDE errors.
Error SA1601 Partial elements should be documented
test/Microsoft.Health.Fhir.R4.Tests.Integration/Persistence/FhirStorageTests.cs
test/Microsoft.Health.Fhir.R5.Tests.Integration/Persistence/FhirStorageTests.cs
test/Microsoft.Health.Fhir.Stu3.Tests.Integration/Persistence/FhirStorageTests.cs
Error IDE0005 Using directive is unnecessary.
src/Microsoft.Health.Fhir.Core/Configs/CoreFeatureConfiguration.cs
src/Microsoft.Health.Fhir.Core/Models/ModelInfoProvider.cs
src/Microsoft.Health.Fhir.Shared.Api.UnitTests/Features/Bundle/FhirTransactionFailedExceptionTests.cs
Related issues
Addresses 85267.
Testing
Added new tests to catch these types of exceptions.
Ran the following tests:
Microsoft.Health.Fhir.Azure.UnitTests
Microsoft.Health.Fhir.Core.UnitTests
Microsoft.Health.Fhir.SqlServer.UnitTests
FHIR Team Checklist
Refs AB#85267
+semver: patch