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,9 +1563,12 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
|
|
||||||
if (pol.checkExists()) {
|
if (pol.checkExists()) {
|
||||||
if (we == null) {
|
if (we == null) {
|
||||||
if (fetcher == null)
|
if (fetcher == null) {
|
||||||
throw new FHIRException("Resource resolution services not provided");
|
if (!refType.equals("contained"))
|
||||||
we = fetcher.fetch(hostContext.appContext, ref);
|
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+"'");
|
rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, we != null, "Unable to resolve resource '"+ref+"'");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue