@databrainhq/mcp-server 0.2.1 → 0.2.2

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
@@ -242,7 +242,7 @@ var DatabrainClient = class {
242
242
  method: options.method,
243
243
  headers,
244
244
  body: options.body ? JSON.stringify(options.body) : void 0,
245
- signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
245
+ signal: AbortSignal.timeout(options.timeoutMs || REQUEST_TIMEOUT_MS)
246
246
  });
247
247
  if (!response.ok) {
248
248
  const errorBody = await response.text();
@@ -286,7 +286,7 @@ var DatabrainClient = class {
286
286
  return data;
287
287
  } catch (err) {
288
288
  if (err instanceof DatabrainApiError) throw err;
289
- if (attempt < MAX_RETRIES && err?.name === "TimeoutError") {
289
+ if (attempt < MAX_RETRIES && err?.name === "TimeoutError" && !options.noRetryOnTimeout) {
290
290
  const delay = Math.min(1e3 * Math.pow(2, attempt - 1), 8e3);
291
291
  logger.warn(`Request timed out, retrying in ${delay}ms`, { path: options.path });
292
292
  await new Promise((r) => setTimeout(r, delay));
@@ -545,7 +545,9 @@ var QueryApi = class {
545
545
  method: "POST",
546
546
  path: "/api/v2/data-app/ask",
547
547
  body: params,
548
- auth: "service"
548
+ auth: "service",
549
+ timeoutMs: 3e5,
550
+ noRetryOnTimeout: true
549
551
  });
550
552
  }
551
553
  async getSemanticLayer(datamartName) {