Fix handling timeouts as a temporary error

This commit is contained in:
Samuel Elliott 2023-01-16 21:38:14 +00:00
parent 5c6f106b78
commit 67fb379e22
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -34,7 +34,7 @@ export function timeoutSignal(ms = 60 * 1000) {
const timeout = setTimeout(() => {
const err = new Error('Timeout');
Object.assign(err, TemporaryErrorSymbol, true);
Object.defineProperty(err, TemporaryErrorSymbol, {value: true});
controller.abort(err);
}, ms);