mr-memory 2.11.5 → 2.11.7
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/package.json +1 -1
- package/upload.ts +9 -2
package/package.json
CHANGED
package/upload.ts
CHANGED
|
@@ -14,7 +14,7 @@ type MemoryLine = {
|
|
|
14
14
|
const MAX_ITEM_CHARS = 8000;
|
|
15
15
|
const TARGET_CHUNK_CHARS = 4000;
|
|
16
16
|
const MAX_BATCH_BYTES = 2_000_000;
|
|
17
|
-
const MAX_BATCH_COUNT =
|
|
17
|
+
const MAX_BATCH_COUNT = 100;
|
|
18
18
|
const BATCH_SLEEP_MS = 150;
|
|
19
19
|
const MAX_HTTP_RETRIES = 3;
|
|
20
20
|
|
|
@@ -351,8 +351,15 @@ export async function runUpload(params: {
|
|
|
351
351
|
totalFailed += batchFailed;
|
|
352
352
|
|
|
353
353
|
if (batchFailed > 0) {
|
|
354
|
-
const errHint = result.errors?.[0] ? ` (${result.errors[0].slice(0,
|
|
354
|
+
const errHint = result.errors?.[0] ? ` (${result.errors[0].slice(0, 120)})` : "";
|
|
355
355
|
console.log(`⚠ ${batchStored} stored, ${batchFailed} skipped${errHint}`);
|
|
356
|
+
// Show detailed error diagnostics (up to 5 per batch)
|
|
357
|
+
if (result.errors && result.errors.length > 1) {
|
|
358
|
+
for (const err of result.errors.slice(0, 5)) {
|
|
359
|
+
console.log(` → ${err.slice(0, 200)}`);
|
|
360
|
+
}
|
|
361
|
+
if (result.errors.length > 5) console.log(` → ... and ${result.errors.length - 5} more`);
|
|
362
|
+
}
|
|
356
363
|
} else {
|
|
357
364
|
console.log(`✓ ${batchStored} stored`);
|
|
358
365
|
}
|