You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read properties of undefined (reading 'toString')
at CacheDataClient.set (/home/runner/MomentoCollections/node_modules/@gomomento/sdk/dist/src/internal/cache-data-client.js:173:122)
at CacheClient.set (/home/runner/MomentoCollections/node_modules/@gomomento/sdk-core/dist/src/internal/clients/cache/AbstractCacheClient.js:88:29)
at MomentoCache.set (/home/runner/MomentoCollections/node_modules/@gomomento/sdk-core/dist/src/internal/clients/cache/momento-cache.js:13:33)
at run (/home/runner/MomentoCollections/index.js:13:31)
at Object. (/home/runner/MomentoCollections/index.js:20:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
Thoughts
I think ttlToUse is not being populated if not explicitly provided.
SDK Version
v1.39.3
The text was updated successfully, but these errors were encountered:
This turned out to be an issue with a constructor argument name (defaultTtl instead of defaultTtlSeconds). Updated #649 to add explicit runtime checks for constructor arguments for JS users.
If I run this code, I get the error listed at the bottom.
Error:
/home/runner/MomentoCollections/node_modules/@gomomento/sdk/dist/src/internal/cache-data-client.js:173
this.logger.trace(
Issuing 'set' request; key: ${key.toString()}, value length: ${value.length}, ttl: ${ttlToUse.toString()}
);TypeError: Cannot read properties of undefined (reading 'toString')
at CacheDataClient.set (/home/runner/MomentoCollections/node_modules/@gomomento/sdk/dist/src/internal/cache-data-client.js:173:122)
at CacheClient.set (/home/runner/MomentoCollections/node_modules/@gomomento/sdk-core/dist/src/internal/clients/cache/AbstractCacheClient.js:88:29)
at MomentoCache.set (/home/runner/MomentoCollections/node_modules/@gomomento/sdk-core/dist/src/internal/clients/cache/momento-cache.js:13:33)
at run (/home/runner/MomentoCollections/index.js:13:31)
at Object. (/home/runner/MomentoCollections/index.js:20:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
Thoughts
I think
ttlToUse
is not being populated if not explicitly provided.SDK Version
v1.39.3
The text was updated successfully, but these errors were encountered: