延长风控手动扫描前端超时
This commit is contained in:
@@ -27,7 +27,7 @@ const ENDPOINTS = Object.freeze({
|
||||
RK003: { method: 'GET', path: '/api/v1/risk/alerts/{alertNo}' },
|
||||
RK004: { method: 'GET', path: '/api/v1/risk/evidence/{source}' },
|
||||
RK005: { method: 'GET', path: '/api/v1/risk/notifications' },
|
||||
RK006: { method: 'POST', path: '/api/v1/risk/alerts/scan', idempotent: true },
|
||||
RK006: { method: 'POST', path: '/api/v1/risk/alerts/scan', idempotent: true, timeout: 60000 },
|
||||
RK007: { method: 'POST', path: '/api/v1/risk/alerts/{alertNo}/acknowledgements', idempotent: true },
|
||||
RK008: { method: 'POST', path: '/api/v1/risk/alerts/{alertNo}/investigations', idempotent: true },
|
||||
RK009: { method: 'POST', path: '/api/v1/risk/alerts/{alertNo}/exclusions', idempotent: true },
|
||||
@@ -96,7 +96,10 @@ async function request(endpointId, options = {}) {
|
||||
const controller = new AbortController();
|
||||
const abortListener = () => controller.abort();
|
||||
options.signal?.addEventListener('abort', abortListener, { once: true });
|
||||
const timeoutId = window.setTimeout(() => controller.abort(), options.timeout || 8000);
|
||||
const timeoutId = window.setTimeout(
|
||||
() => controller.abort(),
|
||||
options.timeout || endpoint.timeout || 8000,
|
||||
);
|
||||
try {
|
||||
const response = await fetch(`${pathFor(endpoint, options.pathParams)}${queryString}`, {
|
||||
method: endpoint.method,
|
||||
|
||||
Reference in New Issue
Block a user