@skilder-ai/runtime 0.7.8 → 0.7.9

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/dist/index.js CHANGED
@@ -137705,8 +137705,14 @@ var NatsCacheService = class NatsCacheService2 extends Service {
137705
137705
  async put(bucket, key, value) {
137706
137706
  const kv = this.getBucket(bucket);
137707
137707
  const data = JSON.stringify(value);
137708
- const revision = await kv.put(key, data);
137709
- return revision;
137708
+ try {
137709
+ const revision = await kv.put(key, data);
137710
+ return revision;
137711
+ } catch (error48) {
137712
+ const sizeBytes = new TextEncoder().encode(data).length;
137713
+ this.logger.error({ event: "cache_put_failed", bucket, key, sizeBytes, err: error48.message }, `Failed to put cache entry (${(sizeBytes / 1024).toFixed(1)} KB)`);
137714
+ throw error48;
137715
+ }
137710
137716
  }
137711
137717
  async delete(bucket, key) {
137712
137718
  const kv = this.getBucket(bucket);