Unified · Split
| @@ -619,10 +619,12 @@ const tryDetectOpenApi = (input: { · 618 unmodified lines | ||
| 619 | 619 | })); |
| 620 | 620 | |
| 621 | 621 | if (response._tag === "Left") { |
| 622 | + console.warn(`[discovery] OpenAPI probe HTTP fetch failed for ${input.normalizedUrl}:`, response.left.message); | |
| 622 | 623 | return null; |
| 623 | 624 | } |
| 624 | 625 | |
| 625 | 626 | if (response.right.status < 200 || response.right.status >= 300) { |
| 627 | + console.warn(`[discovery] OpenAPI probe got status ${response.right.status} for ${input.normalizedUrl}`); | |
| 626 | 628 | return null; |
| 627 | 629 | } |
| 628 | 630 | |
| @@ -630,6 +632,7 @@ const tryDetectOpenApi = (input: { · 1 unmodified line | ||
| 630 | 632 | extractOpenApiManifest(input.normalizedUrl, response.right.text), |
| 631 | 633 | ); |
| 632 | 634 | if (manifest._tag === "Left") { |
| 635 | + console.warn(`[discovery] OpenAPI manifest extraction failed for ${input.normalizedUrl}:`, manifest.left instanceof Error ? manifest.left.message : String(manifest.left)); | |
| 633 | 636 | return null; |
| 634 | 637 | } |
| 635 | 638 | |
| @@ -662,7 +665,10 @@ const tryDetectOpenApi = (input: { · 26 unmodified lines | ||
| 662 | 665 | warnings: [], |
| 663 | 666 | }, |
| 664 | 667 | } satisfies OpenApiProbeResult; |
| 665 | − }).pipe(Effect.catchAll(() => Effect.succeed(null))); | |
| 668 | + }).pipe(Effect.catchAll((error: unknown) => { | |
| 669 | + console.warn(`[discovery] OpenAPI detection unexpected error for ${input.normalizedUrl}:`, error instanceof Error ? error.message : String(error)); | |
| 670 | + return Effect.succeed(null); | |
| 671 | + })); | |
| 666 | 672 | |
| 667 | 673 | const looksLikeGraphqlEndpoint = (normalizedUrl: string): boolean => |
| 668 | 674 | /graphql/i.test(new URL(normalizedUrl).pathname); |