better 'missing annotation' error messages
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -37,7 +37,9 @@ export function getEntityLocationRef(entity: Entity): string {
|
||||
const ref = entity.metadata.annotations?.[ANNOTATION_LOCATION];
|
||||
if (!ref) {
|
||||
const entityRef = stringifyEntityRef(entity);
|
||||
throw new InputError(`Entity '${entityRef}' does not have a location`);
|
||||
throw new InputError(
|
||||
`Entity '${entityRef}' does not have the annotation ${ANNOTATION_LOCATION}`,
|
||||
);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
@@ -47,7 +49,7 @@ export function getEntityOriginLocationRef(entity: Entity): string {
|
||||
if (!ref) {
|
||||
const entityRef = stringifyEntityRef(entity);
|
||||
throw new InputError(
|
||||
`Entity '${entityRef}' does not have an origin location`,
|
||||
`Entity '${entityRef}' does not have the annotation ${ANNOTATION_ORIGIN_LOCATION}`,
|
||||
);
|
||||
}
|
||||
return ref;
|
||||
|
||||
Reference in New Issue
Block a user