Thee effect of setting a timeout in layout.client.register is unclear and does not seem to work predictably.
A timeout of 1 ms only causes a BodyTimeoutError on some requests.
Other times the request goes through.
If we "patch" the podium HTTP client in http.js with an AbortSignal with the corresponding bodyTimeout the requests consistently fail as we expect:
async request(url, options) {
const { statusCode, headers, body } = await request(
new URL(url),
{...options, signal: url.includes('manifest') ? undefined : AbortSignal.timeout(options.bodyTimeout)},
);
return { statusCode, headers, body };
}
Thee effect of setting a timeout in
layout.client.register
is unclear and does not seem to work predictably.A timeout of 1 ms only causes a
BodyTimeoutError
on some requests.Other times the request goes through. If we "patch" the podium HTTP client in http.js with an
AbortSignal
with the correspondingbodyTimeout
the requests consistently fail as we expect:Possibly related issue: https://github.com/nodejs/undici/issues/3297