@mastra/lance 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/dist/index.js CHANGED
@@ -920,6 +920,7 @@ var StoreMemoryLance = class extends MemoryStorage {
920
920
  hasMore
921
921
  };
922
922
  } catch (error) {
923
+ if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
923
924
  const mastraError = new MastraError({
924
925
  id: createStorageErrorId("LANCE", "LIST_MESSAGES", "FAILED"),
925
926
  domain: ErrorDomain.STORAGE,
@@ -931,13 +932,7 @@ var StoreMemoryLance = class extends MemoryStorage {
931
932
  }, error);
932
933
  this.logger?.error?.(mastraError.toString());
933
934
  this.logger?.trackException?.(mastraError);
934
- return {
935
- messages: [],
936
- total: 0,
937
- page,
938
- perPage: perPageForResponse,
939
- hasMore: false
940
- };
935
+ throw mastraError;
941
936
  }
942
937
  }
943
938
  async saveMessages(args) {
@@ -1045,6 +1040,7 @@ var StoreMemoryLance = class extends MemoryStorage {
1045
1040
  hasMore: offset + perPage < total
1046
1041
  };
1047
1042
  } catch (error) {
1043
+ if (error instanceof MastraError && error.category === ErrorCategory.USER) throw error;
1048
1044
  throw new MastraError({
1049
1045
  id: createStorageErrorId("LANCE", "LIST_THREADS", "FAILED"),
1050
1046
  domain: ErrorDomain.STORAGE,