Fix the server exception when validating an invalid local reference
'fetcher == null' is ok for a local reference. Unfortunately, there are now two messages with the same meaning: - one from the ProfileValidation - one from the code in this location
This commit is contained in:
parent
f2cd05fe3b
commit
b2107baae4
|
@ -1563,10 +1563,13 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
|
||||
if (pol.checkExists()) {
|
||||
if (we == null) {
|
||||
if (fetcher == null)
|
||||
if (fetcher == null) {
|
||||
if (!refType.equals("contained"))
|
||||
throw new FHIRException("Resource resolution services not provided");
|
||||
} else {
|
||||
we = fetcher.fetch(hostContext.appContext, ref);
|
||||
}
|
||||
}
|
||||
rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, we != null, "Unable to resolve resource '"+ref+"'");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue