Code review fixes.
This commit is contained in:
@@ -109,13 +109,15 @@ export class CatalogClient implements CatalogApi {
|
||||
|
||||
const { location, entities } = await response.json();
|
||||
|
||||
if (!location) throw new Error(`Location wasn't added: ${target}`);
|
||||
if (!location) {
|
||||
throw new Error(`Location wasn't added: ${target}`);
|
||||
}
|
||||
|
||||
if (entities.length === 0)
|
||||
if (entities.length === 0) {
|
||||
throw new Error(
|
||||
`Location was added but has no entities specified yet: ${target}`,
|
||||
);
|
||||
|
||||
}
|
||||
return {
|
||||
location,
|
||||
entities,
|
||||
|
||||
Reference in New Issue
Block a user