-
Notifications
You must be signed in to change notification settings - Fork 526
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
Update $convert-data error log #3859
Conversation
…ode and stack trace.
_logger.LogInformation(convertException, "Convert data failed."); | ||
} | ||
|
||
_logger.LogError($"Convert data failed. An exception of type {convertException.GetType()} occurred with error code - {convertException.FhirConverterErrorCode}. {convertException.StackTrace}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing we are losing is the an explicit message that the error occurred during post processing. We should be able to infer that from the stack trace but it may still be nice to include a post processing indicator in the log for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type already has that information.
e.g. of how it was logged - An exception of type Microsoft.Health.Fhir.Liquid.Converter.Exceptions.PostprocessException occurred during postprocessing.
Yeah if we have derived classes for PostProcessException later (we don't have any now so we throw this type itself), then yes this would make sense, but that is also why I added the FhirConverterErrorCode as that is meant to give more granular nsights on when/what error caused this exception. So I feel that should lead us to the exact point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I can also add that check if we feel the exception type is not enough to indicate that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to lift FHIR Owner's block.
@LTA-Thinking , thanks for taking a look. Question - the PR build & deploy seems to be failing at an unrelated change to this PR, and I am also seeing other PRs blocked by the same error. Do you know if anyone is taking a look into that? What is the best place to bring this up and track status? |
Description
Update $convert-data error log. Currently, the entire exception is logged in some cases (except post processing exceptions) which might not be ideal in case the message has text from the input data being processed.
Updating the log to only mention exception type, FHIRConverterErrorCode and stack trace.
Related issues
Addresses AB#120207.
Testing
Describe how this change was tested.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)