(url: string)
| 119 | const headers = shouldAttachShareAuthHeaders(file, req.baseUrl) ? req.headers : {} |
| 120 | |
| 121 | const tryFetch = (url: string) => |
| 122 | Effect.tryPromise({ |
| 123 | try: () => fetch(url, { headers }), |
| 124 | catch: (e) => |
| 125 | new CliError({ |
| 126 | message: `Failed to fetch share data: ${e instanceof Error ? e.message : String(e)}`, |
| 127 | }), |
| 128 | }) |
| 129 | |
| 130 | const dataPath = req.api.data(slug) |
| 131 | let response = yield* tryFetch(`${baseUrl}${dataPath}`) |