@eluvio/elv-client-js 3.1.90 → 3.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "3.1.90",
3
+ "version": "3.1.91",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "3.1.90",
3
+ "version": "3.1.91",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/ElvClient.js",
6
6
  "author": "Kevin Talmadge",
@@ -234,11 +234,14 @@ exports.ContentType = async function({name, typeId, versionHash, publicOnly=fals
234
234
  if(name) {
235
235
  this.Log("Looking up type by name in content space metadata...");
236
236
  // Look up named type in content space metadata
237
- typeId = await this.ContentObjectMetadata({
238
- libraryId: this.contentSpaceLibraryId,
239
- objectId: this.contentSpaceObjectId,
240
- metadataSubtree: UrlJoin("public", "contentTypes", name)
241
- });
237
+ try {
238
+ typeId = await this.ContentObjectMetadata({
239
+ libraryId: this.contentSpaceLibraryId,
240
+ objectId: this.contentSpaceObjectId,
241
+ metadataSubtree: UrlJoin("public", "contentTypes", name)
242
+ });
243
+ // eslint-disable-next-line no-empty
244
+ } catch(error) {}
242
245
  }
243
246
 
244
247
  if(!typeId) {
@@ -310,11 +313,15 @@ exports.ContentTypes = async function() {
310
313
  this.Log(typeAddresses);
311
314
 
312
315
  // Content space types
313
- const contentSpaceTypes = await this.ContentObjectMetadata({
314
- libraryId: this.contentSpaceLibraryId,
315
- objectId: this.contentSpaceObjectId,
316
- metadataSubtree: "public/contentTypes"
317
- }) || {};
316
+ let contentSpaceTypes = {};
317
+ try {
318
+ contentSpaceTypes = await this.ContentObjectMetadata({
319
+ libraryId: this.contentSpaceLibraryId,
320
+ objectId: this.contentSpaceObjectId,
321
+ metadataSubtree: "public/contentTypes"
322
+ }) || {};
323
+ // eslint-disable-next-line no-empty
324
+ } catch(error) {}
318
325
 
319
326
  const contentSpaceTypeAddresses = Object.values(contentSpaceTypes)
320
327
  .map(typeId => this.utils.HashToAddress(typeId));