This commit is contained in:
2026-03-07 06:47:42 +07:00
parent 96535147fb
commit 05fa7f52dd
3 changed files with 32 additions and 21 deletions

View File

@@ -11,7 +11,7 @@
const nats = require('nats');
const crypto = require('crypto');
const fetch = require('node-fetch');
// Use native fetch available in Node.js 18+
const arrow = require('apache-arrow');
// ---------------------------------------------- Constants ---------------------------------------------- //
@@ -302,7 +302,7 @@ async function fetchWithBackoff(url, maxRetries, baseDelay, maxDelay, correlatio
throw new Error(`Failed to fetch: ${response.status}`);
}
} catch (e) {
logTrace(correlationId, `Attempt ${attempt} failed: ${e.constructor.name}`);
logTrace(correlationId, `Attempt ${attempt} failed: ${e.constructor.name} - ${e.message}`);
if (attempt < maxRetries) {
await new Promise(resolve => setTimeout(resolve, delay));