(url)
| 1 | async function fetchJSON(url) { |
| 2 | try { |
| 3 | const res = await fetch(url); |
| 4 | if (!res.ok) { |
| 5 | throw new Error(`HTTP ${res.status}`); |
| 6 | } |
| 7 | return await res.json(); |
| 8 | } catch (err) { |
| 9 | console.error("fetch failed:", err.message); |
| 10 | return null; |
| 11 | } |
| 12 | } |
nothing calls this directly
no outgoing calls
no test coverage detected