diff --git a/lib/util/http/legacy.ts b/lib/util/http/legacy.ts index fa4de817740d231f8921d950909f1101a7e1b97c..19bbf6845559a012f22d2d3195e92b7639da7d9a 100644 --- a/lib/util/http/legacy.ts +++ b/lib/util/http/legacy.ts @@ -26,6 +26,12 @@ Object.defineProperty(HttpError.prototype, 'headers', { }, }); +Object.defineProperty(HttpError.prototype, 'url', { + get: function url(this: HttpError) { + return this.response?.url; + }, +}); + export type GotLegacyError<E = unknown, T = unknown> = HttpError & { statusCode?: number; body: {