@mastra/dynamodb 1.2.2 → 1.3.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 +30 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +7 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1852,6 +1852,7 @@ var MemoryStorageDynamoDB = class extends MemoryStorage {
|
|
|
1852
1852
|
hasMore
|
|
1853
1853
|
};
|
|
1854
1854
|
} catch (error) {
|
|
1855
|
+
if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
|
|
1855
1856
|
const mastraError = new MastraError({
|
|
1856
1857
|
id: createStorageErrorId("DYNAMODB", "LIST_MESSAGES", "FAILED"),
|
|
1857
1858
|
domain: ErrorDomain.STORAGE,
|
|
@@ -1863,13 +1864,7 @@ var MemoryStorageDynamoDB = class extends MemoryStorage {
|
|
|
1863
1864
|
}, error);
|
|
1864
1865
|
this.logger?.error?.(mastraError.toString());
|
|
1865
1866
|
this.logger?.trackException?.(mastraError);
|
|
1866
|
-
|
|
1867
|
-
messages: [],
|
|
1868
|
-
total: 0,
|
|
1869
|
-
page,
|
|
1870
|
-
perPage: perPageForResponse,
|
|
1871
|
-
hasMore: false
|
|
1872
|
-
};
|
|
1867
|
+
throw mastraError;
|
|
1873
1868
|
}
|
|
1874
1869
|
}
|
|
1875
1870
|
async saveMessages(args) {
|
|
@@ -1989,7 +1984,8 @@ var MemoryStorageDynamoDB = class extends MemoryStorage {
|
|
|
1989
1984
|
hasMore: offset + perPage < total
|
|
1990
1985
|
};
|
|
1991
1986
|
} catch (error) {
|
|
1992
|
-
|
|
1987
|
+
if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
|
|
1988
|
+
const mastraError = new MastraError({
|
|
1993
1989
|
id: createStorageErrorId("DYNAMODB", "LIST_THREADS", "FAILED"),
|
|
1994
1990
|
domain: ErrorDomain.STORAGE,
|
|
1995
1991
|
category: ErrorCategory.THIRD_PARTY,
|
|
@@ -2000,6 +1996,9 @@ var MemoryStorageDynamoDB = class extends MemoryStorage {
|
|
|
2000
1996
|
perPage: perPageForResponse
|
|
2001
1997
|
}
|
|
2002
1998
|
}, error);
|
|
1999
|
+
this.logger?.error?.(mastraError.toString());
|
|
2000
|
+
this.logger?.trackException?.(mastraError);
|
|
2001
|
+
throw mastraError;
|
|
2003
2002
|
}
|
|
2004
2003
|
}
|
|
2005
2004
|
_sortMessages(messages, field, direction) {
|