Merge pull request #1691 from hapifhir/FixOperationOutcomeRendering

Fix issue with rendering OperationOutcomes that don't have 'detail'
This commit is contained in:
Grahame Grieve 2024-07-17 11:51:16 +08:00 committed by GitHub
commit dc750bb211
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -88,8 +88,9 @@ public class OperationOutcomeRenderer extends ResourceRenderer {
d = true; d = true;
td.addText(s.primitiveValue()); td.addText(s.primitiveValue());
} }
tr.td().addText(getTranslatedCode(i.child("code"))); tr.td().addText(getTranslatedCode(i.child("code")));
tr.td().addText(i.child("details").primitiveValue("text")); if (i.has("details"))
tr.td().addText(i.child("details").primitiveValue("text"));
smartAddText(tr.td(), i.primitiveValue("diagnostics")); smartAddText(tr.td(), i.primitiveValue("diagnostics"));
if (hasSource) { if (hasSource) {
ResourceWrapper ext = i.extension(ToolingExtensions.EXT_ISSUE_SOURCE); ResourceWrapper ext = i.extension(ToolingExtensions.EXT_ISSUE_SOURCE);