(stderrLines: string[])
| 563 | }; |
| 564 | |
| 565 | function detectCursorError(stderrLines: string[]): CursorErrorKind | undefined { |
| 566 | if (stderrLines.length === 0) { |
| 567 | return undefined; |
| 568 | } |
| 569 | const lower = stderrLines.join(' ').toLowerCase(); |
| 570 | if (lower.includes('resource_exhausted') || lower.includes('quota') || lower.includes('limit')) { |
| 571 | return 'resource_exhausted'; |
| 572 | } |
| 573 | if ( |
| 574 | lower.includes('connecterror') || |
| 575 | lower.includes('connection refused') || |
| 576 | lower.includes('timeout') || |
| 577 | lower.includes('network') || |
| 578 | lower.includes('dns') |
| 579 | ) { |
| 580 | return 'network'; |
| 581 | } |
| 582 | if (lower.includes('unauthorized') || lower.includes('authentication') || lower.includes('api key')) { |
| 583 | return 'auth'; |
| 584 | } |
| 585 | return undefined; |
| 586 | } |
| 587 | |
| 588 | async function executeCursor( |
| 589 | projectId: string, |
no outgoing calls
no test coverage detected