Update Wrong Error Code in Register Component DryRun

The error code for input validation should not default to 500

Signed-off-by: Dede Hamzah <dehamzah@gmail.com>
This commit is contained in:
Dede Hamzah
2022-07-07 14:14:37 +07:00
parent 3a6f3536f3
commit cdcf596fde
@@ -81,7 +81,7 @@ export class DefaultLocationService implements LocationService {
stringifyEntityRef(processed.completedEntity),
)
) {
throw new Error(
throw new InputError(
`Duplicate nested entity: ${stringifyEntityRef(
processed.completedEntity,
)}`,
@@ -90,7 +90,7 @@ export class DefaultLocationService implements LocationService {
unprocessedEntities.push(...processed.deferredEntities);
entities.push(processed.completedEntity);
} else {
throw Error(processed.errors.map(String).join(', '));
throw new InputError(processed.errors.map(String).join(', '));
}
}
return entities;