const html = yield* HttpClientRequest.get(url).pipe(
HttpClientRequest.setHeaders({
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36',
'Accept-Language': 'en-US,en;q=0.9',
Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
}),
HttpClientRequest.accept('text/html'),
client.execute,
E.flatMap((res) => res.text),
E.catchTag('ResponseError', (e) => E.zipRight(E.tap(E.logError)(e), E.succeed(''))),
);
Batch job failed: ResponseError: StatusCode: non 2xx status code (403 GET https://*****.***/)
at filterStatusOk (/node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/internal/httpClientResponse.js:166:126)
ELIFECYCLE Command failed.
const html = yield* HttpClientRequest.get(url).pipe(
HttpClientRequest.setHeaders({
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36',
'Accept-Language': 'en-US,en;q=0.9',
Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
}),
HttpClientRequest.accept('text/html'),
client.execute,
E.flatMap((res) => res.text),
E.catchTag('ResponseError', (e) => E.zipRight(E.tap(E.logError)(e), E.succeed(''))),
);
Batch job failed: ResponseError: StatusCode: non 2xx status code (403 GET https://*****.***/)
at filterStatusOk (/node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/internal/httpClientResponse.js:166:126)
ELIFECYCLE Command failed.