-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add new exception handling for errors with Partitions over 20GB * Reuse PreconditionFailedException * Format error message * Handle possible null reference while sanitizing logs. * Transaction failure improvements * Refactoring * New logs to track profile refreshes * Simplify use of PreconditionFailedException * Added error message to resource file.
- Loading branch information
Showing
6 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/Microsoft.Health.Fhir.Core/Exceptions/TransactionFailureException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. | ||
// ------------------------------------------------------------------------------------------------- | ||
|
||
using System.Diagnostics; | ||
using Microsoft.Health.Fhir.Core.Models; | ||
|
||
namespace Microsoft.Health.Fhir.Core.Exceptions | ||
{ | ||
public sealed class TransactionFailureException : FhirException | ||
{ | ||
public TransactionFailureException(string message) | ||
: base(message) | ||
{ | ||
Debug.Assert(!string.IsNullOrEmpty(message), "Exception message should not be empty"); | ||
|
||
Issues.Add(new OperationOutcomeIssue( | ||
OperationOutcomeConstants.IssueSeverity.Error, | ||
OperationOutcomeConstants.IssueType.Exception, | ||
message)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters