@mastra/redis 1.3.1 → 1.4.0-alpha.0
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/CHANGELOG.md +27 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +4 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -14
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -240,6 +240,7 @@ var StoreMemoryRedis = class extends MemoryStorage {
|
|
|
240
240
|
hasMore: perPageInput === false ? false : end < total
|
|
241
241
|
};
|
|
242
242
|
} catch (error) {
|
|
243
|
+
if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
|
|
243
244
|
const mastraError = new MastraError({
|
|
244
245
|
id: createStorageErrorId("REDIS", "LIST_THREADS", "FAILED"),
|
|
245
246
|
domain: ErrorDomain.STORAGE,
|
|
@@ -253,13 +254,7 @@ var StoreMemoryRedis = class extends MemoryStorage {
|
|
|
253
254
|
}, error);
|
|
254
255
|
this.logger.trackException(mastraError);
|
|
255
256
|
this.logger.error(mastraError.toString());
|
|
256
|
-
|
|
257
|
-
threads: [],
|
|
258
|
-
total: 0,
|
|
259
|
-
page,
|
|
260
|
-
perPage: perPageForResponse,
|
|
261
|
-
hasMore: false
|
|
262
|
-
};
|
|
257
|
+
throw mastraError;
|
|
263
258
|
}
|
|
264
259
|
}
|
|
265
260
|
async saveThread({ thread }) {
|
|
@@ -613,6 +608,7 @@ var StoreMemoryRedis = class extends MemoryStorage {
|
|
|
613
608
|
hasMore
|
|
614
609
|
};
|
|
615
610
|
} catch (error) {
|
|
611
|
+
if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
|
|
616
612
|
const mastraError = new MastraError({
|
|
617
613
|
id: createStorageErrorId("REDIS", "LIST_MESSAGES", "FAILED"),
|
|
618
614
|
domain: ErrorDomain.STORAGE,
|
|
@@ -624,13 +620,7 @@ var StoreMemoryRedis = class extends MemoryStorage {
|
|
|
624
620
|
}, error);
|
|
625
621
|
this.logger.error(mastraError.toString());
|
|
626
622
|
this.logger.trackException(mastraError);
|
|
627
|
-
|
|
628
|
-
messages: [],
|
|
629
|
-
total: 0,
|
|
630
|
-
page,
|
|
631
|
-
perPage: perPageForResponse,
|
|
632
|
-
hasMore: false
|
|
633
|
-
};
|
|
623
|
+
throw mastraError;
|
|
634
624
|
}
|
|
635
625
|
}
|
|
636
626
|
async getResourceById({ resourceId }) {
|