(text: string)
| 66 | }; |
| 67 | |
| 68 | const parseJsonSafe = (text: string): unknown => { |
| 69 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: classifying an untrusted upstream error body; a parse failure just means "not a JSON body", never an error path |
| 70 | try { |
| 71 | // oxlint-disable-next-line executor/no-json-parse -- boundary: same untrusted-body classification; the parsed value is only structurally inspected, never decoded into domain types |
| 72 | return JSON.parse(text) as unknown; |
| 73 | } catch { |
| 74 | return undefined; |
| 75 | } |
| 76 | }; |
| 77 | |
| 78 | const detectFromBody = (body: unknown): boolean => { |
| 79 | if (typeof body === "string") { |
no outgoing calls
no test coverage detected