Code review fixes.

This commit is contained in:
Marek Calus
2020-10-22 09:35:31 +02:00
parent d9c63dd56c
commit cb93d87b17
4 changed files with 67 additions and 380 deletions
+5 -3
View File
@@ -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,