@mastra/upstash 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 +28 -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 +6 -6
package/dist/index.js
CHANGED
|
@@ -436,6 +436,7 @@ var StoreMemoryUpstash = class extends MemoryStorage {
|
|
|
436
436
|
hasMore: perPageInput === false ? false : end < total
|
|
437
437
|
};
|
|
438
438
|
} catch (error) {
|
|
439
|
+
if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
|
|
439
440
|
const mastraError = new MastraError({
|
|
440
441
|
id: createStorageErrorId("UPSTASH", "LIST_THREADS", "FAILED"),
|
|
441
442
|
domain: ErrorDomain.STORAGE,
|
|
@@ -449,13 +450,7 @@ var StoreMemoryUpstash = class extends MemoryStorage {
|
|
|
449
450
|
}, error);
|
|
450
451
|
this.logger?.trackException(mastraError);
|
|
451
452
|
this.logger.error(mastraError.toString());
|
|
452
|
-
|
|
453
|
-
threads: [],
|
|
454
|
-
total: 0,
|
|
455
|
-
page,
|
|
456
|
-
perPage: perPageForResponse,
|
|
457
|
-
hasMore: false
|
|
458
|
-
};
|
|
453
|
+
throw mastraError;
|
|
459
454
|
}
|
|
460
455
|
}
|
|
461
456
|
async saveThread({ thread }) {
|
|
@@ -847,6 +842,7 @@ var StoreMemoryUpstash = class extends MemoryStorage {
|
|
|
847
842
|
hasMore
|
|
848
843
|
};
|
|
849
844
|
} catch (error) {
|
|
845
|
+
if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
|
|
850
846
|
const mastraError = new MastraError({
|
|
851
847
|
id: createStorageErrorId("UPSTASH", "LIST_MESSAGES", "FAILED"),
|
|
852
848
|
domain: ErrorDomain.STORAGE,
|
|
@@ -858,13 +854,7 @@ var StoreMemoryUpstash = class extends MemoryStorage {
|
|
|
858
854
|
}, error);
|
|
859
855
|
this.logger.error(mastraError.toString());
|
|
860
856
|
this.logger?.trackException(mastraError);
|
|
861
|
-
|
|
862
|
-
messages: [],
|
|
863
|
-
total: 0,
|
|
864
|
-
page,
|
|
865
|
-
perPage: perPageForResponse,
|
|
866
|
-
hasMore: false
|
|
867
|
-
};
|
|
857
|
+
throw mastraError;
|
|
868
858
|
}
|
|
869
859
|
}
|
|
870
860
|
async getResourceById({ resourceId }) {
|