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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user