@elisra-devops/docgen-data-provider 1.141.0 → 1.143.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/bin/helpers/requestContext.d.ts +66 -0
- package/bin/helpers/requestContext.js +255 -0
- package/bin/helpers/requestContext.js.map +1 -0
- package/bin/helpers/tfs.d.ts +5 -0
- package/bin/helpers/tfs.js +31 -31
- package/bin/helpers/tfs.js.map +1 -1
- package/bin/modules/GitDataProvider.js +3 -2
- package/bin/modules/GitDataProvider.js.map +1 -1
- package/bin/modules/JfrogDataProvider.js +2 -1
- package/bin/modules/JfrogDataProvider.js.map +1 -1
- package/bin/modules/PipelinesDataProvider.js +4 -3
- package/bin/modules/PipelinesDataProvider.js.map +1 -1
- package/bin/modules/ResultDataProvider.js +12 -11
- package/bin/modules/ResultDataProvider.js.map +1 -1
- package/bin/modules/TestDataProvider.js +4 -3
- package/bin/modules/TestDataProvider.js.map +1 -1
- package/bin/modules/TicketsDataProvider.js +13 -12
- package/bin/modules/TicketsDataProvider.js.map +1 -1
- package/bin/tests/helpers/requestContext.test.d.ts +1 -0
- package/bin/tests/helpers/requestContext.test.js +204 -0
- package/bin/tests/helpers/requestContext.test.js.map +1 -0
- package/bin/tests/helpers/tfs.test.js +73 -0
- package/bin/tests/helpers/tfs.test.js.map +1 -1
- package/bin/tests/modules/JfrogDataProvider.test.js +1 -1
- package/bin/tests/modules/JfrogDataProvider.test.js.map +1 -1
- package/bin/tests/modules/ResultDataProvider.test.js +5 -2
- package/bin/tests/modules/ResultDataProvider.test.js.map +1 -1
- package/bin/tests/modules/gitDataProvider.test.js +1 -1
- package/bin/tests/modules/gitDataProvider.test.js.map +1 -1
- package/bin/tests/modules/pipelineDataProvider.test.js +1 -1
- package/bin/tests/modules/pipelineDataProvider.test.js.map +1 -1
- package/bin/tests/modules/testDataProvider.test.js +1 -1
- package/bin/tests/modules/testDataProvider.test.js.map +1 -1
- package/bin/tests/modules/ticketsDataProvider.test.js +2 -2
- package/bin/tests/modules/ticketsDataProvider.test.js.map +1 -1
- package/bin/tests/utils/logger.test.js +120 -0
- package/bin/tests/utils/logger.test.js.map +1 -1
- package/bin/utils/logSink.d.ts +14 -0
- package/bin/utils/logSink.js +12 -0
- package/bin/utils/logSink.js.map +1 -1
- package/bin/utils/logger.d.ts +3 -0
- package/bin/utils/logger.js +96 -10
- package/bin/utils/logger.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/requestContext.ts +258 -0
- package/src/helpers/tfs.ts +38 -28
- package/src/modules/GitDataProvider.ts +3 -2
- package/src/modules/JfrogDataProvider.ts +2 -1
- package/src/modules/PipelinesDataProvider.ts +4 -3
- package/src/modules/ResultDataProvider.ts +12 -11
- package/src/modules/TestDataProvider.ts +4 -3
- package/src/modules/TicketsDataProvider.ts +13 -12
- package/src/tests/helpers/requestContext.test.ts +252 -0
- package/src/tests/helpers/tfs.test.ts +107 -0
- package/src/tests/modules/JfrogDataProvider.test.ts +2 -1
- package/src/tests/modules/ResultDataProvider.test.ts +6 -2
- package/src/tests/modules/gitDataProvider.test.ts +2 -1
- package/src/tests/modules/pipelineDataProvider.test.ts +2 -1
- package/src/tests/modules/testDataProvider.test.ts +4 -1
- package/src/tests/modules/ticketsDataProvider.test.ts +2 -2
- package/src/tests/utils/logger.test.ts +146 -1
- package/src/utils/logSink.ts +18 -3
- package/src/utils/logger.ts +85 -7
package/src/helpers/tfs.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
2
|
import logger from '../utils/logger';
|
|
3
|
+
import { AdoRequestContext, annotateAdoError, buildAdoRequestContext, templatePath } from './requestContext';
|
|
3
4
|
|
|
4
5
|
// Environment detection
|
|
5
6
|
const isNode = typeof window === 'undefined' && typeof process !== 'undefined' && process.versions?.node;
|
|
@@ -83,7 +84,7 @@ export class TFSServices {
|
|
|
83
84
|
return res;
|
|
84
85
|
} catch (e) {
|
|
85
86
|
logger.error(`error download zip file , url : ${url}`);
|
|
86
|
-
throw new Error(String(e));
|
|
87
|
+
throw annotateAdoError(new Error(String(e)), buildAdoRequestContext(e, { method: 'GET', url }));
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
|
|
@@ -178,7 +179,7 @@ export class TFSServices {
|
|
|
178
179
|
const result = await this.axiosInstance.request(config);
|
|
179
180
|
return result.data;
|
|
180
181
|
} catch (e: any) {
|
|
181
|
-
this.
|
|
182
|
+
this.reportFailure(e, { method: 'GET', url });
|
|
182
183
|
throw e;
|
|
183
184
|
}
|
|
184
185
|
}
|
|
@@ -203,7 +204,7 @@ export class TFSServices {
|
|
|
203
204
|
const result = await this.axiosInstance.request(config);
|
|
204
205
|
return result;
|
|
205
206
|
} catch (e: any) {
|
|
206
|
-
this.
|
|
207
|
+
this.reportFailure(e, { method: requestMethod, url, data });
|
|
207
208
|
throw e;
|
|
208
209
|
}
|
|
209
210
|
}
|
|
@@ -241,15 +242,18 @@ export class TFSServices {
|
|
|
241
242
|
const jitter = Math.random() * 0.3 + 0.85; // Between 0.85 and 1.15
|
|
242
243
|
const delay = Math.min(baseDelay * Math.pow(2, attempts - 1) * jitter, 5000);
|
|
243
244
|
|
|
244
|
-
|
|
245
|
+
const retryCtx = buildAdoRequestContext(e, { method: config.method, url, data: config.data }, attempts);
|
|
246
|
+
logger.warn(
|
|
247
|
+
`ADO request retrying: ${retryCtx.method} ${templatePath(retryCtx.url)} -> ${retryCtx.status ?? e?.code ?? 'no response'} (${attempts}/${maxAttempts}, in ${Math.round(delay)}ms)`,
|
|
248
|
+
{ adoRequest: retryCtx }
|
|
249
|
+
);
|
|
245
250
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
246
251
|
continue;
|
|
247
252
|
}
|
|
248
253
|
|
|
249
|
-
//
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
254
|
+
// Always annotate (so any caller that logs this error — however it words its own
|
|
255
|
+
// message — carries the request), log the dedicated record only when asked to.
|
|
256
|
+
this.reportFailure(e, { method: config.method, url, data: config.data }, attempts, printError);
|
|
253
257
|
|
|
254
258
|
throw e;
|
|
255
259
|
}
|
|
@@ -284,28 +288,34 @@ export class TFSServices {
|
|
|
284
288
|
}
|
|
285
289
|
|
|
286
290
|
/**
|
|
287
|
-
*
|
|
291
|
+
* Describes the failed request once, attaches it to the error, and (optionally) emits the one
|
|
292
|
+
* dedicated "ADO request failed" record.
|
|
288
293
|
*/
|
|
289
|
-
private static
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
294
|
+
private static reportFailure(
|
|
295
|
+
error: any,
|
|
296
|
+
request: { method?: string; url: string; data?: unknown },
|
|
297
|
+
attempt?: number,
|
|
298
|
+
print: boolean = true
|
|
299
|
+
): void {
|
|
300
|
+
const context = buildAdoRequestContext(error, request, attempt);
|
|
301
|
+
context.reported = print;
|
|
302
|
+
annotateAdoError(error, context);
|
|
303
|
+
if (print) {
|
|
304
|
+
this.logDetailedError(error, context);
|
|
301
305
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Log detailed error information
|
|
310
|
+
*/
|
|
311
|
+
private static logDetailedError(error: any, context: AdoRequestContext): void {
|
|
312
|
+
// The method, templated path and status go in the message itself: Issue grouping keys off
|
|
313
|
+
// the message, and a bare "ADO request failed" folded 401/404/500 on every endpoint into one.
|
|
314
|
+
const outcome = context.status ?? error?.code ?? 'no response';
|
|
315
|
+
logger.error(`ADO request failed: ${context.method ?? 'GET'} ${templatePath(context.url)} -> ${outcome}`, {
|
|
316
|
+
message: error?.message,
|
|
317
|
+
stack: error?.stack,
|
|
318
|
+
adoRequest: context,
|
|
309
319
|
});
|
|
310
320
|
}
|
|
311
321
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TFSServices } from '../helpers/tfs';
|
|
2
2
|
import TicketsDataProvider from './TicketsDataProvider';
|
|
3
3
|
import logger from '../utils/logger';
|
|
4
|
+
import { describeError, logCaughtError } from '../helpers/requestContext';
|
|
4
5
|
import {
|
|
5
6
|
createLinkedRelation,
|
|
6
7
|
createRequirementRelation,
|
|
@@ -124,7 +125,7 @@ export default class GitDataProvider {
|
|
|
124
125
|
}
|
|
125
126
|
return undefined;
|
|
126
127
|
} catch (err: any) {
|
|
127
|
-
logger.warn(`File ${fileName} could not be read
|
|
128
|
+
logger.warn(`File ${fileName} could not be read:`, describeError(err));
|
|
128
129
|
return undefined;
|
|
129
130
|
}
|
|
130
131
|
}
|
|
@@ -1119,7 +1120,7 @@ export default class GitDataProvider {
|
|
|
1119
1120
|
submodules.push(subModule);
|
|
1120
1121
|
}
|
|
1121
1122
|
} catch (error: any) {
|
|
1122
|
-
|
|
1123
|
+
logCaughtError('Error in getSubmodulesData:', error);
|
|
1123
1124
|
} finally {
|
|
1124
1125
|
return submodules;
|
|
1125
1126
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TFSServices } from '../helpers/tfs';
|
|
2
2
|
|
|
3
3
|
import logger from '../utils/logger';
|
|
4
|
+
import { logCaughtError } from '../helpers/requestContext';
|
|
4
5
|
|
|
5
6
|
export default class JfrogDataProvider {
|
|
6
7
|
orgUrl: string = '';
|
|
@@ -56,7 +57,7 @@ export default class JfrogDataProvider {
|
|
|
56
57
|
logger.debug(`CI Url from JFROG: ${getCiResponse.buildInfo.url}`);
|
|
57
58
|
return getCiResponse.buildInfo.url;
|
|
58
59
|
} catch (err: any) {
|
|
59
|
-
|
|
60
|
+
logCaughtError('Error occurred during querying JFrog using:', err);
|
|
60
61
|
throw err;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
@@ -2,6 +2,7 @@ import { PipelineRun, Repository, ResourceRepository } from '../models/tfs-data'
|
|
|
2
2
|
import { TFSServices } from '../helpers/tfs';
|
|
3
3
|
|
|
4
4
|
import logger from '../utils/logger';
|
|
5
|
+
import { logCaughtError } from '../helpers/requestContext';
|
|
5
6
|
import GitDataProvider from './GitDataProvider';
|
|
6
7
|
const pLimit = require('p-limit');
|
|
7
8
|
const MAX_DISCOVERY_PAGES = 50;
|
|
@@ -1331,7 +1332,7 @@ export default class PipelinesDataProvider {
|
|
|
1331
1332
|
}
|
|
1332
1333
|
return res;
|
|
1333
1334
|
} catch (err: any) {
|
|
1334
|
-
|
|
1335
|
+
logCaughtError('Could not fetch Pipeline Run History:', err);
|
|
1335
1336
|
}
|
|
1336
1337
|
}
|
|
1337
1338
|
|
|
@@ -1401,7 +1402,7 @@ export default class PipelinesDataProvider {
|
|
|
1401
1402
|
// Azure DevOps returns continuation token header for next page
|
|
1402
1403
|
continuationToken = this.getContinuationToken(headers);
|
|
1403
1404
|
} catch (err: any) {
|
|
1404
|
-
|
|
1405
|
+
logCaughtError('GetAllReleaseHistory failed:', err);
|
|
1405
1406
|
throw err;
|
|
1406
1407
|
}
|
|
1407
1408
|
} while (continuationToken);
|
|
@@ -1463,7 +1464,7 @@ export default class PipelinesDataProvider {
|
|
|
1463
1464
|
}
|
|
1464
1465
|
}
|
|
1465
1466
|
} catch (err: any) {
|
|
1466
|
-
|
|
1467
|
+
logCaughtError(`Error fetching pipeline ${pipelineRunId} with url ${url} :`, err);
|
|
1467
1468
|
return undefined;
|
|
1468
1469
|
}
|
|
1469
1470
|
}
|
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
MewpRunStatus,
|
|
23
23
|
} from '../models/mewp-reporting';
|
|
24
24
|
import logger from '../utils/logger';
|
|
25
|
+
import { describeError, logCaughtError } from '../helpers/requestContext';
|
|
25
26
|
import MewpExternalIngestionUtils from '../utils/mewpExternalIngestionUtils';
|
|
26
27
|
import MewpExternalTableUtils, {
|
|
27
28
|
MewpExternalFileValidationError,
|
|
@@ -139,7 +140,7 @@ export default class ResultDataProvider {
|
|
|
139
140
|
this.fetchTestPoints(projectName, testPlanId, suite.testSuiteId)
|
|
140
141
|
.then((testPointsItems) => ({ ...suite, testPointsItems }))
|
|
141
142
|
.catch((error: any) => {
|
|
142
|
-
|
|
143
|
+
logCaughtError(`Error occurred for suite ${suite.testSuiteId}:`, error);
|
|
143
144
|
return { ...suite, testPointsItems: [] };
|
|
144
145
|
})
|
|
145
146
|
)
|
|
@@ -274,7 +275,7 @@ export default class ResultDataProvider {
|
|
|
274
275
|
responseSummary = '[unserializable response data]';
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
|
-
logger.error(
|
|
278
|
+
logger.error('Error during getCombinedResultsSummary:', { ...describeError(error), responseSummary });
|
|
278
279
|
// Ensure the error is rethrown to propagate it correctly
|
|
279
280
|
throw new Error(error.message || 'Unknown error occurred during getCombinedResultsSummary');
|
|
280
281
|
}
|
|
@@ -402,7 +403,7 @@ export default class ResultDataProvider {
|
|
|
402
403
|
|
|
403
404
|
return fetchedTestResults;
|
|
404
405
|
} catch (error: any) {
|
|
405
|
-
|
|
406
|
+
logCaughtError('Error during getTestReporterResults:', error);
|
|
406
407
|
}
|
|
407
408
|
}
|
|
408
409
|
|
|
@@ -443,7 +444,7 @@ export default class ResultDataProvider {
|
|
|
443
444
|
|
|
444
445
|
return { planId: testPlanId, planName, rows: rows || [] };
|
|
445
446
|
} catch (error: any) {
|
|
446
|
-
|
|
447
|
+
logCaughtError('Error during getTestReporterFlatResults:', error);
|
|
447
448
|
return { planId: testPlanId, planName: '', rows: [] };
|
|
448
449
|
}
|
|
449
450
|
}
|
|
@@ -745,7 +746,7 @@ export default class ResultDataProvider {
|
|
|
745
746
|
rows,
|
|
746
747
|
};
|
|
747
748
|
} catch (error: any) {
|
|
748
|
-
|
|
749
|
+
logCaughtError('Error during getMewpL2CoverageFlatResults:', error);
|
|
749
750
|
if (error instanceof MewpExternalFileValidationError) {
|
|
750
751
|
throw error;
|
|
751
752
|
}
|
|
@@ -1122,7 +1123,7 @@ export default class ResultDataProvider {
|
|
|
1122
1123
|
rows,
|
|
1123
1124
|
};
|
|
1124
1125
|
} catch (error: any) {
|
|
1125
|
-
|
|
1126
|
+
logCaughtError('Error during getMewpInternalValidationFlatResults:', error);
|
|
1126
1127
|
return defaultPayload;
|
|
1127
1128
|
}
|
|
1128
1129
|
}
|
|
@@ -3071,7 +3072,7 @@ export default class ResultDataProvider {
|
|
|
3071
3072
|
const testPlan = await TFSServices.getItemContent(url, this.token);
|
|
3072
3073
|
return testPlan.name;
|
|
3073
3074
|
} catch (error: any) {
|
|
3074
|
-
|
|
3075
|
+
logCaughtError('Error during fetching Test Plan Name:', error);
|
|
3075
3076
|
return '';
|
|
3076
3077
|
}
|
|
3077
3078
|
}
|
|
@@ -3119,7 +3120,7 @@ export default class ResultDataProvider {
|
|
|
3119
3120
|
};
|
|
3120
3121
|
});
|
|
3121
3122
|
} catch (error: any) {
|
|
3122
|
-
|
|
3123
|
+
logCaughtError('Error during fetching Test Suites:', error);
|
|
3123
3124
|
return [];
|
|
3124
3125
|
}
|
|
3125
3126
|
}
|
|
@@ -3292,7 +3293,7 @@ export default class ResultDataProvider {
|
|
|
3292
3293
|
|
|
3293
3294
|
return count !== 0 ? testPoints.map((testPoint: any) => this.mapTestPoint(testPoint, projectName)) : [];
|
|
3294
3295
|
} catch (error: any) {
|
|
3295
|
-
|
|
3296
|
+
logCaughtError('Error during fetching Test Points:', error);
|
|
3296
3297
|
return [];
|
|
3297
3298
|
}
|
|
3298
3299
|
}
|
|
@@ -4473,7 +4474,7 @@ export default class ResultDataProvider {
|
|
|
4473
4474
|
relatedCRs.push({ id, title, workItemType: 'Change Request', url });
|
|
4474
4475
|
}
|
|
4475
4476
|
} catch (err: any) {
|
|
4476
|
-
|
|
4477
|
+
logCaughtError(`Could not append related work item to test case ${wiByRevision.id}:`, err);
|
|
4477
4478
|
}
|
|
4478
4479
|
}
|
|
4479
4480
|
}
|
|
@@ -4856,7 +4857,7 @@ export default class ResultDataProvider {
|
|
|
4856
4857
|
|
|
4857
4858
|
return { ...suite, testPointsItems, testCasesItems };
|
|
4858
4859
|
} catch (error: any) {
|
|
4859
|
-
|
|
4860
|
+
logCaughtError(`Error occurred for suite ${suite.testSuiteId}:`, error);
|
|
4860
4861
|
return suite;
|
|
4861
4862
|
}
|
|
4862
4863
|
})
|
|
@@ -4,6 +4,7 @@ import { TestSteps, createMomRelation, createRequirementRelation } from '../mode
|
|
|
4
4
|
import { TestCase } from '../models/tfs-data';
|
|
5
5
|
import * as xml2js from 'xml2js';
|
|
6
6
|
import logger from '../utils/logger';
|
|
7
|
+
import { logCaughtError } from '../helpers/requestContext';
|
|
7
8
|
import Utils from '../utils/testStepParserHelper';
|
|
8
9
|
import DataProviderUtils from '../utils/DataProviderUtils';
|
|
9
10
|
const pLimit = require('p-limit');
|
|
@@ -56,7 +57,7 @@ export default class TestDataProvider {
|
|
|
56
57
|
|
|
57
58
|
return result;
|
|
58
59
|
} catch (error: any) {
|
|
59
|
-
|
|
60
|
+
logCaughtError(`Error fetching ${url}:`, error);
|
|
60
61
|
throw error;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
@@ -187,7 +188,7 @@ export default class TestDataProvider {
|
|
|
187
188
|
try {
|
|
188
189
|
return await this.fetchWithCache(testsuitesUrl);
|
|
189
190
|
} catch (e: any) {
|
|
190
|
-
|
|
191
|
+
logCaughtError('Failed to get test suites:', e);
|
|
191
192
|
return null;
|
|
192
193
|
}
|
|
193
194
|
}
|
|
@@ -599,7 +600,7 @@ export default class TestDataProvider {
|
|
|
599
600
|
}
|
|
600
601
|
}
|
|
601
602
|
} catch (err: any) {
|
|
602
|
-
|
|
603
|
+
logCaughtError(`Error while trying to structure testCases for test suite ${suite.id}:`, err);
|
|
603
604
|
}
|
|
604
605
|
|
|
605
606
|
return testCasesUrlList;
|
|
@@ -10,6 +10,7 @@ import { TestSteps } from '../models/tfs-data';
|
|
|
10
10
|
import TestStepParserHelper from '../utils/testStepParserHelper';
|
|
11
11
|
|
|
12
12
|
import logger from '../utils/logger';
|
|
13
|
+
import { describeError, logCaughtError } from '../helpers/requestContext';
|
|
13
14
|
const pLimit = require('p-limit');
|
|
14
15
|
|
|
15
16
|
type FallbackFetchOutcome = {
|
|
@@ -491,7 +492,7 @@ export default class TicketsDataProvider {
|
|
|
491
492
|
break;
|
|
492
493
|
}
|
|
493
494
|
} catch (err: any) {
|
|
494
|
-
|
|
495
|
+
logCaughtError('Error occurred during fetching shared queries:', err);
|
|
495
496
|
throw err;
|
|
496
497
|
}
|
|
497
498
|
}
|
|
@@ -527,7 +528,7 @@ export default class TicketsDataProvider {
|
|
|
527
528
|
})
|
|
528
529
|
);
|
|
529
530
|
} catch (err: any) {
|
|
530
|
-
|
|
531
|
+
logCaughtError('Error occurred during fetching fields by type:', err);
|
|
531
532
|
throw err;
|
|
532
533
|
}
|
|
533
534
|
}
|
|
@@ -558,7 +559,7 @@ export default class TicketsDataProvider {
|
|
|
558
559
|
}
|
|
559
560
|
return { types, states: Array.from(stateSet) };
|
|
560
561
|
} catch (err: any) {
|
|
561
|
-
|
|
562
|
+
logCaughtError('Error fetching work item type states:', err);
|
|
562
563
|
throw err;
|
|
563
564
|
}
|
|
564
565
|
}
|
|
@@ -1286,7 +1287,7 @@ export default class TicketsDataProvider {
|
|
|
1286
1287
|
break;
|
|
1287
1288
|
}
|
|
1288
1289
|
} catch (err: any) {
|
|
1289
|
-
|
|
1290
|
+
logCaughtError(`Could not fetch query results for ${wiqlHref}:`, err);
|
|
1290
1291
|
}
|
|
1291
1292
|
}
|
|
1292
1293
|
|
|
@@ -1662,7 +1663,7 @@ export default class TicketsDataProvider {
|
|
|
1662
1663
|
}
|
|
1663
1664
|
return [...workItemsResultMap.values()];
|
|
1664
1665
|
} catch (error: any) {
|
|
1665
|
-
|
|
1666
|
+
logCaughtError('could not parse requested flat query:', error);
|
|
1666
1667
|
}
|
|
1667
1668
|
}
|
|
1668
1669
|
|
|
@@ -3562,7 +3563,7 @@ export default class TicketsDataProvider {
|
|
|
3562
3563
|
|
|
3563
3564
|
item.fields = { ...parsedFields };
|
|
3564
3565
|
} catch (err: any) {
|
|
3565
|
-
|
|
3566
|
+
logCaughtError('Cannot filter columns:', err);
|
|
3566
3567
|
throw err;
|
|
3567
3568
|
}
|
|
3568
3569
|
}
|
|
@@ -3617,7 +3618,7 @@ export default class TicketsDataProvider {
|
|
|
3617
3618
|
|
|
3618
3619
|
return workItemTypesWithIcons;
|
|
3619
3620
|
} catch (err: any) {
|
|
3620
|
-
|
|
3621
|
+
logCaughtError('Error occurred during fetching work item types:', err);
|
|
3621
3622
|
throw err;
|
|
3622
3623
|
}
|
|
3623
3624
|
}
|
|
@@ -3770,7 +3771,7 @@ export default class TicketsDataProvider {
|
|
|
3770
3771
|
categorizedRequirements['Precedence and Criticality of Requirements'].push(requirementItem);
|
|
3771
3772
|
}
|
|
3772
3773
|
} catch (err: any) {
|
|
3773
|
-
logger.warn(`Could not fetch work item ${workItemId}
|
|
3774
|
+
logger.warn(`Could not fetch work item ${workItemId}:`, describeError(err));
|
|
3774
3775
|
}
|
|
3775
3776
|
}
|
|
3776
3777
|
|
|
@@ -3792,7 +3793,7 @@ export default class TicketsDataProvider {
|
|
|
3792
3793
|
totalCount: workItemIds.length,
|
|
3793
3794
|
};
|
|
3794
3795
|
} catch (err: any) {
|
|
3795
|
-
|
|
3796
|
+
logCaughtError('Could not fetch categorized requirements:', err);
|
|
3796
3797
|
throw err;
|
|
3797
3798
|
}
|
|
3798
3799
|
}
|
|
@@ -3887,7 +3888,7 @@ export default class TicketsDataProvider {
|
|
|
3887
3888
|
const relations = qr?.workItemRelations || [];
|
|
3888
3889
|
result['req-test'] = await resolveQuerySides(cols, relations, true);
|
|
3889
3890
|
} catch (err: any) {
|
|
3890
|
-
|
|
3891
|
+
logCaughtError('GetTraceColumnsByType[req-test] failed:', err);
|
|
3891
3892
|
result['req-test'] = { Requirement: [], 'Test Case': [] };
|
|
3892
3893
|
}
|
|
3893
3894
|
}
|
|
@@ -3899,14 +3900,14 @@ export default class TicketsDataProvider {
|
|
|
3899
3900
|
const relations = qr?.workItemRelations || [];
|
|
3900
3901
|
result['test-req'] = await resolveQuerySides(cols, relations, false);
|
|
3901
3902
|
} catch (err: any) {
|
|
3902
|
-
|
|
3903
|
+
logCaughtError('GetTraceColumnsByType[test-req] failed:', err);
|
|
3903
3904
|
result['test-req'] = { Requirement: [], 'Test Case': [] };
|
|
3904
3905
|
}
|
|
3905
3906
|
}
|
|
3906
3907
|
|
|
3907
3908
|
return result;
|
|
3908
3909
|
} catch (err: any) {
|
|
3909
|
-
|
|
3910
|
+
logCaughtError('GetTraceColumnsByType failed:', err);
|
|
3910
3911
|
return {};
|
|
3911
3912
|
}
|
|
3912
3913
|
}
|