(
label: string,
operation: () => Promise<void>,
options: { rethrow?: boolean } = {},
)
| 1570 | } |
| 1571 | |
| 1572 | private enqueueRunStore( |
| 1573 | label: string, |
| 1574 | operation: () => Promise<void>, |
| 1575 | options: { rethrow?: boolean } = {}, |
| 1576 | ): Promise<void> { |
| 1577 | if (!this.input.runStore || !this.runStoreAvailable) return Promise.resolve(); |
| 1578 | const next = this.traceQueue.then(operation, operation).catch(async (error) => { |
| 1579 | this.runStoreAvailable = false; |
| 1580 | await this.enqueueTraceWriteFailure(error, label); |
| 1581 | if (options.rethrow) throw error; |
| 1582 | }); |
| 1583 | this.traceQueue = next.catch(() => {}); |
| 1584 | return next; |
| 1585 | } |
| 1586 | |
| 1587 | /** |
| 1588 | * Each physical provider request gets its own best-effort diagnostic row. |
no test coverage detected