You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In FHIRRestHelper.processEntriesByMethod we catch FHIROperationException and, if the request was a transaction bundle (i.e. failFast=true) we construct a generic FHIRRestBundledRequestException with a message of "Error while processing request bundle." and a set of issues from the original FHIROperationException.
This works well if the original FHIROperationException has high-quality OperationOutcomeIssue entries.
However, if the FHIROperationException does not, it results in swallowing the actual root cause.
Environment
4.8.3
To Reproduce
Steps to reproduce the behavior:
Submit a transaction bundle that will fail with a FHIROperationException with no issues (not sure how yet)
Note that the exception is logged.
Expected behavior
Exceptions should be explicitly handled or wrapped and re-thrown, never lost.
Additional context
The text was updated successfully, but these errors were encountered:
In addition to their OperationOutcomeIssues, we now include the original
exception in the CausedBy of the FHIRRestBundledRequestException.
This way, if the FHIROperationException was unexpected and has no
corresponding issues, when it gets mapped to a 500 Server Error we will
automatically log the exception from
FHIRResource.exceptionResponse(FHIROperationException, Status).
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
In addition to their OperationOutcomeIssues, we now include the original
exception in the CausedBy of the FHIRRestBundledRequestException.
This way, if the FHIROperationException was unexpected and has no
corresponding issues, when it gets mapped to a 500 Server Error we will
automatically log the exception from
FHIRResource.exceptionResponse(FHIROperationException, Status).
Also changed "bundle request" to "bundled request" in
FHIRRestHelper.logBundleRequestCompletedMsg to match the language at the
start of the bundled request and to make it more clear its the
individual bundled entry that completed and not the entire bundle.
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Describe the bug
In
FHIRRestHelper.processEntriesByMethod
we catch FHIROperationException and, if the request was a transaction bundle (i.e. failFast=true) we construct a generic FHIRRestBundledRequestException with a message of "Error while processing request bundle." and a set of issues from the original FHIROperationException.This works well if the original FHIROperationException has high-quality OperationOutcomeIssue entries.
However, if the FHIROperationException does not, it results in swallowing the actual root cause.
Environment
4.8.3
To Reproduce
Steps to reproduce the behavior:
Note that the exception is logged.
Expected behavior
Exceptions should be explicitly handled or wrapped and re-thrown, never lost.
Additional context
The text was updated successfully, but these errors were encountered: