From 1f9bc07aea1c557ff4dd685b404e3088a0bd1646 Mon Sep 17 00:00:00 2001 From: Lumia1108 Date: Wed, 16 Sep 2026 07:18:47 +0900 Subject: [PATCH 1/6] Lower suppressed vocabulary log level Log intentionally suppressed fetch and parsing failures at debug level so they do not produce application error events. https://github.com/fedify-dev/fedify/issues/933 Assisted-by: Codex:gpt-5.6 --- changes.d/vocab-tools/suppressed-error-log-level.md | 3 +++ packages/vocab-tools/src/property.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changes.d/vocab-tools/suppressed-error-log-level.md diff --git a/changes.d/vocab-tools/suppressed-error-log-level.md b/changes.d/vocab-tools/suppressed-error-log-level.md new file mode 100644 index 000000000..b54d73335 --- /dev/null +++ b/changes.d/vocab-tools/suppressed-error-log-level.md @@ -0,0 +1,3 @@ + - Changed suppressed vocabulary fetch and parsing failures to log at the + debug level so that intentionally handled failures are not reported as + application errors. [[#933] by Lumia1108] diff --git a/packages/vocab-tools/src/property.ts b/packages/vocab-tools/src/property.ts index 7964e01d4..4bf2cc381 100644 --- a/packages/vocab-tools/src/property.ts +++ b/packages/vocab-tools/src/property.ts @@ -167,7 +167,7 @@ async function* generateProperty( }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).debug( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -233,7 +233,7 @@ async function* generateProperty( } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).debug( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); From 641da61621293d2299ec3a6a338880f5f883e24b Mon Sep 17 00:00:00 2001 From: Lumia1108 Date: Mon, 21 Sep 2026 08:52:23 +0900 Subject: [PATCH 2/6] Propagate suppressed document errors Pass suppression state through document loaders so handled HTTP failures log warnings while unsuppressed failures keep their existing error logs and exception behavior. Add regression coverage for fetch and parsing failures. https://github.com/fedify-dev/fedify/issues/933 https://github.com/fedify-dev/fedify/pull/1035 Assisted-by: Codex:gpt-5.6 --- CHANGES.md | 5 + .../vocab-tools/suppressed-error-log-level.md | 9 +- packages/fedify/src/utils/docloader.ts | 2 +- packages/vocab-runtime/src/docloader.ts | 48 +++++-- packages/vocab-tools/src/property.ts | 8 +- packages/vocab/src/vocab.test.ts | 126 ++++++++++++++++++ 6 files changed, 181 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 010738330..085f6bd9b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1067,6 +1067,11 @@ To be released. objects without the extension. [[#1037], [#1038]] - Added the `trustEmbeddedObjects` type schema option so embedded metadata identifiers need not establish trust in linked actors. [[#1037], [#1038]] + - Changed suppressed vocabulary fetch and parsing failures to log at the + debug level so that intentionally handled failures are not reported as + application errors. [[#933] by Lumia1108\] + +[#933]: https://github.com/fedify-dev/fedify/issues/933 Version 2.3.8 diff --git a/changes.d/vocab-tools/suppressed-error-log-level.md b/changes.d/vocab-tools/suppressed-error-log-level.md index b54d73335..5962d3cbd 100644 --- a/changes.d/vocab-tools/suppressed-error-log-level.md +++ b/changes.d/vocab-tools/suppressed-error-log-level.md @@ -1,3 +1,8 @@ +--- +links: + '#1035': https://github.com/fedify-dev/fedify/pull/1035 + '#933': https://github.com/fedify-dev/fedify/issues/933 +--- - Changed suppressed vocabulary fetch and parsing failures to log at the - debug level so that intentionally handled failures are not reported as - application errors. [[#933] by Lumia1108] + warning level so that intentionally handled failures are not reported as + application errors. [[#933], [#1035] by Jae Hui Hong] diff --git a/packages/fedify/src/utils/docloader.ts b/packages/fedify/src/utils/docloader.ts index 1367341d7..5b2e38c51 100644 --- a/packages/fedify/src/utils/docloader.ts +++ b/packages/fedify/src/utils/docloader.ts @@ -84,7 +84,7 @@ export function getAuthenticatedDocumentLoader( validateRedirect: validateUrl, }, ); - return getRemoteDocument(url, response, load); + return getRemoteDocument(url, response, load, options); } async function validateUrl(url: string): Promise { diff --git a/packages/vocab-runtime/src/docloader.ts b/packages/vocab-runtime/src/docloader.ts index 45508c0f2..7882a44bc 100644 --- a/packages/vocab-runtime/src/docloader.ts +++ b/packages/vocab-runtime/src/docloader.ts @@ -47,6 +47,13 @@ export interface DocumentLoaderOptions { * @since 1.8.0 */ signal?: AbortSignal; + + /** + * Whether to lower error-level logs for recoverable document loading + * failures to warning-level logs. The loader still throws the error. + * @default `false` + */ + suppressError?: boolean; } /** @@ -127,6 +134,7 @@ function createResponseMetadata(response: Response): Response { * @param url The URL of the document to load. * @param response The response to get the document from. * @param fetch The function to fetch the document. + * @param options The options for loading the document. * @returns The loaded remote document. * @throws {FetchError} If the response is not OK. * @internal @@ -138,18 +146,31 @@ export async function getRemoteDocument( url: string, options?: DocumentLoaderOptions, ) => Promise, + options?: DocumentLoaderOptions, ): Promise { const documentUrl = response.url === "" ? url : response.url; const docUrl = new URL(documentUrl); if (!response.ok) { - logger.error( - "Failed to fetch document: {status} {url} {headers}", - { - status: response.status, - url: documentUrl, - headers: Object.fromEntries(response.headers.entries()), - }, - ); + if (options?.suppressError) { + logger.warn( + "Failed to fetch document: {status} {url} {headers}", + { + status: response.status, + url: documentUrl, + headers: Object.fromEntries(response.headers.entries()), + }, + ); + } else { + logger.error( + "Failed to fetch document: {status} {url} {headers}", + { + status: response.status, + url: documentUrl, + headers: Object.fromEntries(response.headers.entries()), + }, + ); + } + throw new FetchError( documentUrl, `HTTP ${response.status}: ${documentUrl}`, @@ -198,7 +219,7 @@ export async function getRemoteDocument( "Found alternate document: {alternateUrl} from {url}", { alternateUrl: altUri.href, url: documentUrl }, ); - return await fetch(altUri.href); + return await fetch(altUri.href, options); } } } @@ -260,7 +281,7 @@ export async function getRemoteDocument( "Found alternate document: {alternateUrl} from {url}", { alternateUrl: attribs.href, url: documentUrl }, ); - return await fetch(new URL(attribs.href, docUrl).href); + return await fetch(new URL(attribs.href, docUrl).href, options); } } try { @@ -415,7 +436,12 @@ export function getDocumentLoader( return await load(redirectUrl, options, redirected + 1, visited); } - const result = await getRemoteDocument(currentUrl, response, load); + const result = await getRemoteDocument( + currentUrl, + response, + load, + options, + ); span.setAttribute("docloader.document_url", result.documentUrl); if (result.contextUrl != null) { span.setAttribute("docloader.context_url", result.contextUrl); diff --git a/packages/vocab-tools/src/property.ts b/packages/vocab-tools/src/property.ts index 4bf2cc381..f253a043f 100644 --- a/packages/vocab-tools/src/property.ts +++ b/packages/vocab-tools/src/property.ts @@ -159,7 +159,9 @@ async function* generateProperty( } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -167,7 +169,7 @@ async function* generateProperty( }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).debug( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -233,7 +235,7 @@ async function* generateProperty( } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).debug( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); diff --git a/packages/vocab/src/vocab.test.ts b/packages/vocab/src/vocab.test.ts index 50d381962..30d987fa6 100644 --- a/packages/vocab/src/vocab.test.ts +++ b/packages/vocab/src/vocab.test.ts @@ -2,6 +2,7 @@ import { mockDocumentLoader, test } from "@fedify/fixture"; import { decodeMultibase, type DocumentLoader, + FetchError, LanguageString, parseDecimal, type RemoteDocument, @@ -14,6 +15,7 @@ import { } from "@fedify/vocab-tools"; import { configure, type LogRecord, reset } from "@logtape/logtape"; import { pascalCase } from "es-toolkit"; +import fetchMock from "fetch-mock"; import { deepStrictEqual, notDeepStrictEqual, @@ -1804,6 +1806,130 @@ test({ }); }, }); +test({ + name: "Announce.getObject() logs suppressed failures as warnings", + permissions: { env: true, read: true }, + async fn() { + const records: LogRecord[] = []; + const notFoundUrl = "https://example.com/suppressed-not-found"; + const invalidObjectUrl = "https://example.com/invalid-object"; + + await reset(); + fetchMock.spyGlobal(); + + try { + await configure({ + sinks: { + buffer(record: LogRecord): void { + records.push(record); + }, + }, + filters: {}, + loggers: [{ category: [], sinks: ["buffer"] }], + }); + + fetchMock.get(notFoundUrl, { status: 404 }); + + const suppressedFetch = new Announce({ + object: new URL(notFoundUrl), + }); + deepStrictEqual( + await suppressedFetch.getObject({ suppressError: true }), + null, + ); + ok( + records.some((record) => + record.level === "warning" && + record.rawMessage === + "Failed to fetch document: {status} {url} {headers}" + ), + ); + ok( + records.some((record) => + record.level === "warning" && + record.rawMessage === "Failed to fetch {url}: {error}" + ), + ); + deepStrictEqual( + records.some((record) => + record.level === "error" && + ( + record.rawMessage === + "Failed to fetch document: {status} {url} {headers}" || + record.rawMessage === "Failed to fetch {url}: {error}" + ) + ), + false, + ); + + records.length = 0; + + const unsuppressedFetch = new Announce({ + object: new URL(notFoundUrl), + }); + await rejects( + () => unsuppressedFetch.getObject(), + FetchError, + ); + ok( + records.some((record) => + record.level === "error" && + record.rawMessage === + "Failed to fetch document: {status} {url} {headers}" + ), + ); + + records.length = 0; + + // deno-lint-ignore require-await + const invalidDocumentLoader: DocumentLoader = async (url) => ({ + contextUrl: null, + documentUrl: url, + document: null, + }); + + const suppressedParsing = new Announce({ + object: new URL(invalidObjectUrl), + }); + deepStrictEqual( + await suppressedParsing.getObject({ + documentLoader: invalidDocumentLoader, + suppressError: true, + }), + null, + ); + ok( + records.some((record) => + record.level === "warning" && + record.rawMessage === "Failed to parse {url}: {error}" + ), + ); + deepStrictEqual( + records.some((record) => + record.level === "error" && + record.rawMessage === "Failed to parse {url}: {error}" + ), + false, + ); + + records.length = 0; + + const unsuppressedParsing = new Announce({ + object: new URL(invalidObjectUrl), + }); + await rejects( + () => + unsuppressedParsing.getObject({ + documentLoader: invalidDocumentLoader, + }), + TypeError, + ); + } finally { + fetchMock.hardReset(); + await reset(); + } + }, +}); test("Activity.getObject() fetches canonical portable IRIs", async () => { const fetchedUrls: string[] = []; From e7b5d80e79cc66d367cb4bc238032ed53a1855ac Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 29 Sep 2026 16:45:26 +0900 Subject: [PATCH 3/6] Keep suppressed lookup failures below error level Apply suppression to redirect failures, private address rejection, and JSON-LD context loading in ordinary and portable lookups. Scope context suppression to the current lookup so returned objects retain normal logging for later calls. Keep URL checks and exceptions intact. Add regression coverage for the suppressed and unsuppressed paths, including authenticated redirects and context loader reuse. Refresh all runtime snapshots after rebasing onto the current main branch. https://github.com/fedify-dev/fedify/pull/1035#discussion_r4059196037 https://github.com/fedify-dev/fedify/pull/1035#discussion_r4059196140 https://github.com/fedify-dev/fedify/pull/1035#discussion_r4059216272 Assisted-by: Codex:gpt-6-sol --- CHANGES.md | 5 +- packages/fedify/src/utils/docloader.test.ts | 51 + packages/fedify/src/utils/docloader.ts | 14 +- packages/vocab-runtime/src/docloader.ts | 15 +- .../src/internal/jsonld-cache.ts | 35 + .../src/internal/portable-dereference.ts | 17 +- .../src/__snapshots__/class.test.ts.deno.snap | 2500 ++++++++++++----- .../src/__snapshots__/class.test.ts.node.snap | 2500 ++++++++++++----- .../src/__snapshots__/class.test.ts.snap | 2500 ++++++++++++----- packages/vocab-tools/src/class.ts | 1 + packages/vocab-tools/src/property.ts | 9 +- packages/vocab/src/vocab.test.ts | 194 ++ 12 files changed, 5616 insertions(+), 2225 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 085f6bd9b..bc6d7184d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1068,10 +1068,11 @@ To be released. - Added the `trustEmbeddedObjects` type schema option so embedded metadata identifiers need not establish trust in linked actors. [[#1037], [#1038]] - Changed suppressed vocabulary fetch and parsing failures to log at the - debug level so that intentionally handled failures are not reported as - application errors. [[#933] by Lumia1108\] + warning level so that intentionally handled failures are not reported as + application errors. [[#933], [#1035] by Jae Hui Hong\] [#933]: https://github.com/fedify-dev/fedify/issues/933 +[#1035]: https://github.com/fedify-dev/fedify/pull/1035 Version 2.3.8 diff --git a/packages/fedify/src/utils/docloader.test.ts b/packages/fedify/src/utils/docloader.test.ts index 56ea9671a..77a19e1f2 100644 --- a/packages/fedify/src/utils/docloader.test.ts +++ b/packages/fedify/src/utils/docloader.test.ts @@ -3,6 +3,7 @@ import { FetchError, UrlError } from "@fedify/vocab-runtime"; import { assertEquals, assertRejects } from "@std/assert"; import fetchMock from "fetch-mock"; import { verifyRequest } from "../sig/http.ts"; +import { configure, type LogRecord, reset } from "@logtape/logtape"; import { rsaPrivateKey2 } from "../testing/keys.ts"; import { getAuthenticatedDocumentLoader } from "./docloader.ts"; @@ -250,3 +251,53 @@ test("getAuthenticatedDocumentLoader() bounds JSON after redirects", async () => fetchMock.hardReset(); } }); + +test("authenticated document loader suppresses private URL logs", async () => { + const records: LogRecord[] = []; + const loader = getAuthenticatedDocumentLoader({ + keyId: new URL("https://example.com/key2"), + privateKey: rsaPrivateKey2, + }); + await reset(); + await configure({ + sinks: { + capture: (record) => { + records.push(record); + }, + }, + loggers: [{ + category: ["fedify"], + lowestLevel: "debug", + sinks: ["capture"], + }], + }); + fetchMock.spyGlobal(); + let requests = 0; + fetchMock.get("https://example.com/private-redirect", () => { + requests++; + return Response.redirect("http://127.0.0.1/private", 302); + }); + try { + for ( + const url of [ + "http://127.0.0.1/private", + "https://example.com/private-redirect", + ] + ) { + for (const suppressError of [true, false, undefined]) { + records.length = 0; + requests = 0; + await assertRejects(() => loader(url, { suppressError }), UrlError); + const failures = records.filter((r) => + r.rawMessage === "Disallowed private URL: {url}" + ); + assertEquals(failures.length, 1); + assertEquals(failures[0].level, suppressError ? "warning" : "error"); + assertEquals(requests, url.startsWith("http://127") ? 0 : 1); + } + } + } finally { + fetchMock.hardReset(); + await reset(); + } +}); diff --git a/packages/fedify/src/utils/docloader.ts b/packages/fedify/src/utils/docloader.ts index 5b2e38c51..58d0ee438 100644 --- a/packages/fedify/src/utils/docloader.ts +++ b/packages/fedify/src/utils/docloader.ts @@ -70,7 +70,7 @@ export function getAuthenticatedDocumentLoader( url: string, options?: DocumentLoaderOptions, ): Promise { - await validateUrl(url); + await validateUrl(url, options); const originalRequest = createActivityPubRequest(url, { userAgent }); const response = await doubleKnock( originalRequest, @@ -81,19 +81,25 @@ export function getAuthenticatedDocumentLoader( log: curry(logRequest)(logger), tracerProvider, signal: options?.signal, - validateRedirect: validateUrl, + validateRedirect: (url) => validateUrl(url, options), }, ); return getRemoteDocument(url, response, load, options); } - async function validateUrl(url: string): Promise { + async function validateUrl( + url: string, + options?: DocumentLoaderOptions, + ): Promise { if (!allowPrivateAddress) { try { await validatePublicUrl(url); } catch (error) { if (error instanceof UrlError) { - logger.error("Disallowed private URL: {url}", { url, error }); + logger[options?.suppressError ? "warn" : "error"]( + "Disallowed private URL: {url}", + { url, error }, + ); } throw error; } diff --git a/packages/vocab-runtime/src/docloader.ts b/packages/vocab-runtime/src/docloader.ts index 7882a44bc..0bb221c5e 100644 --- a/packages/vocab-runtime/src/docloader.ts +++ b/packages/vocab-runtime/src/docloader.ts @@ -371,10 +371,13 @@ export function getDocumentLoader( await validatePublicUrl(currentUrl); } catch (error) { if (error instanceof UrlError) { - logger.error("Disallowed private URL: {url}", { - url: currentUrl, - error, - }); + logger[options?.suppressError ? "warn" : "error"]( + "Disallowed private URL: {url}", + { + url: currentUrl, + error, + }, + ); } throw error; } @@ -408,7 +411,7 @@ export function getDocumentLoader( response.headers.has("Location") ) { if (redirected >= maximumRedirection) { - logger.error( + logger[options?.suppressError ? "warn" : "error"]( "Too many redirections ({redirections}) while fetching document.", { redirections: redirected + 1, url: currentUrl }, ); @@ -423,7 +426,7 @@ export function getDocumentLoader( ).href; span.setAttribute("http.redirect.url", redirectUrl); if (visited.has(redirectUrl)) { - logger.error( + logger[options?.suppressError ? "warn" : "error"]( "Detected a redirect loop while fetching document: {url} -> " + "{redirectUrl}", { url: currentUrl, redirectUrl }, diff --git a/packages/vocab-runtime/src/internal/jsonld-cache.ts b/packages/vocab-runtime/src/internal/jsonld-cache.ts index d239c437f..63397be8c 100644 --- a/packages/vocab-runtime/src/internal/jsonld-cache.ts +++ b/packages/vocab-runtime/src/internal/jsonld-cache.ts @@ -4,6 +4,41 @@ import { formatIri, haveSameFe34Origin, haveSameIriOrigin } from "../url.ts"; const noJsonLdContext = Symbol("noJsonLdContext"); +const scopedLoaders = new WeakMap< + DocumentLoader, + { base: DocumentLoader; released: boolean } +>(); + +/** + * Lowers context loading failure logs for one accessor operation. Parsed + * objects retain the loader, so release it before returning to the caller. + * Released wrappers are unwrapped to avoid accumulating loader chains. + * @internal Used by generated vocabulary accessors; not a public API. + */ +export function createScopedContextLoader( + base: DocumentLoader, + suppressError?: boolean, +): { loader: DocumentLoader; release: () => void } { + for ( + let state = scopedLoaders.get(base); + state?.released; + state = scopedLoaders.get(base) + ) { + base = state.base; + } + if (!suppressError) return { loader: base, release: () => {} }; + const state = { base, released: false }; + const loader: DocumentLoader = (url, options) => + base(url, state.released ? options : { ...options, suppressError: true }); + scopedLoaders.set(loader, state); + return { + loader, + release: () => { + state.released = true; + }, + }; +} + /** * Options for deciding whether two IRIs should be treated as same-origin. * diff --git a/packages/vocab-runtime/src/internal/portable-dereference.ts b/packages/vocab-runtime/src/internal/portable-dereference.ts index 500e8dd82..4ce29f448 100644 --- a/packages/vocab-runtime/src/internal/portable-dereference.ts +++ b/packages/vocab-runtime/src/internal/portable-dereference.ts @@ -562,6 +562,7 @@ function parseGatewayOrigin(gateway: string | URL): URL | null { */ export function createSnapshotContextLoader( contextLoader: DocumentLoader, + suppressError?: boolean, ): { loader: DocumentLoader; release: () => void } { // Objects parsed during a dereference keep its loader, so later // dereferences from them would otherwise wrap released pass-throughs in @@ -592,9 +593,10 @@ export function createSnapshotContextLoader( } let promise = cache.get(key); if (promise == null) { - const loading = contextLoader(url, options).then((document) => - structuredClone(document) - ); + const loading = contextLoader( + url, + suppressError ? { ...options, suppressError: true } : options, + ).then((document) => structuredClone(document)); promise = loading; cache.set(key, loading); loading.catch(() => { @@ -721,7 +723,7 @@ export async function dereferencePortableIri( const fail = (error: unknown): null => { span?.setStatus({ code: SpanStatusCode.ERROR, message: String(error) }); if (options.suppressError) { - logger.error("Failed to dereference {url}: {error}", { + logger.warn("Failed to dereference {url}: {error}", { url: lookupUrl, error, }); @@ -769,7 +771,10 @@ export async function dereferencePortableIri( // retrieve the portable IRI itself: requestUrls.push({ url: lookupUrl, gateway: null }); } - const snapshot = createSnapshotContextLoader(options.contextLoader); + const snapshot = createSnapshotContextLoader( + options.contextLoader, + options.suppressError, + ); const contextLoader = snapshot.loader; const attempts: Attempt[] = []; const { signal } = options; @@ -784,7 +789,7 @@ export async function dereferencePortableIri( try { remoteDocument = response ?? await options.documentLoader( requestUrl, - signal == null ? undefined : { signal }, + { signal, suppressError: options.suppressError }, ); } catch (error) { signal?.throwIfAborted(); diff --git a/packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap b/packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap index d28f26e54..6f88a7a0d 100644 --- a/packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap +++ b/packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap @@ -30,6 +30,7 @@ import { } from \\"@fedify/vocab-runtime\\"; import { compactJsonLdCache, + createScopedContextLoader, getJsonLdContext, isTrustedIriOrigin, normalizeJsonLdIris @@ -2355,7 +2356,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -2363,7 +2366,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -2375,8 +2378,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -2385,7 +2392,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -2429,7 +2436,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -2455,6 +2462,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -2734,7 +2742,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -2742,7 +2752,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -2754,8 +2764,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -2764,7 +2778,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -2808,7 +2822,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -2834,6 +2848,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -3258,7 +3273,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -3266,7 +3283,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -3278,8 +3295,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -3288,7 +3309,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -3332,7 +3353,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -3358,6 +3379,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -3773,7 +3795,9 @@ get contents(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -3781,7 +3805,7 @@ get contents(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -3793,8 +3817,12 @@ get contents(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -3803,7 +3831,7 @@ get contents(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -3847,7 +3875,7 @@ get contents(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -3873,6 +3901,7 @@ get contents(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -4189,7 +4218,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -4197,7 +4228,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -4209,8 +4240,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -4219,7 +4254,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -4263,7 +4298,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -4289,6 +4324,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -4557,7 +4593,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -4565,7 +4603,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -4577,8 +4615,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -4587,7 +4629,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -4631,7 +4673,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -4657,6 +4699,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -5066,7 +5109,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -5074,7 +5119,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -5086,8 +5131,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -5096,7 +5145,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -5140,7 +5189,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -5166,6 +5215,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -5575,7 +5625,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -5583,7 +5635,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -5595,8 +5647,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -5605,7 +5661,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -5649,7 +5705,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -5675,6 +5731,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -6070,7 +6127,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -6078,7 +6137,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -6090,8 +6149,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -6100,7 +6163,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -6144,7 +6207,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -6170,6 +6233,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -6565,7 +6629,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -6573,7 +6639,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -6585,8 +6651,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -6595,7 +6665,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -6639,7 +6709,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -6665,6 +6735,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7071,7 +7142,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7079,7 +7152,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -7091,8 +7164,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7101,7 +7178,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7145,7 +7222,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -7171,6 +7248,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7426,7 +7504,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7434,7 +7514,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -7446,8 +7526,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7456,7 +7540,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7500,7 +7584,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -7526,6 +7610,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7787,7 +7872,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7795,7 +7882,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -7807,8 +7894,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7817,7 +7908,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7861,7 +7952,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -7887,6 +7978,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8148,7 +8240,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8156,7 +8250,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -8168,8 +8262,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8178,7 +8276,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -8222,7 +8320,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -8248,6 +8346,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8543,7 +8642,9 @@ get summaries(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8551,7 +8652,7 @@ get summaries(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -8563,8 +8664,12 @@ get summaries(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8573,7 +8678,7 @@ get summaries(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -8617,7 +8722,7 @@ get summaries(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -8643,6 +8748,7 @@ get summaries(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8948,7 +9054,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8956,7 +9064,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -8968,8 +9076,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8978,7 +9090,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9022,7 +9134,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -9048,6 +9160,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -9434,7 +9547,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -9442,7 +9557,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -9454,8 +9569,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -9464,7 +9583,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9508,7 +9627,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -9534,6 +9653,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -9920,7 +10040,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -9928,7 +10050,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -9940,8 +10062,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -9950,7 +10076,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9994,7 +10120,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -10020,6 +10146,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -10406,7 +10533,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -10414,7 +10543,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -10426,8 +10555,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -10436,7 +10569,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -10480,7 +10613,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -10506,6 +10639,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -10956,7 +11090,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -10964,7 +11100,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -10976,8 +11112,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -10986,7 +11126,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11030,7 +11170,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -11056,6 +11196,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -11479,7 +11620,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -11487,7 +11630,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -11499,8 +11642,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -11509,7 +11656,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11553,7 +11700,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -11579,6 +11726,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -11834,7 +11982,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -11842,7 +11992,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -11854,8 +12004,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -11864,7 +12018,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11908,7 +12062,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -11934,6 +12088,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -12189,7 +12344,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -12197,7 +12354,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -12209,8 +12366,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -12219,7 +12380,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -12263,7 +12424,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -12289,6 +12450,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -17731,7 +17893,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -17739,7 +17903,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -17751,8 +17915,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -17761,7 +17929,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -17805,7 +17973,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -17831,6 +17999,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -18110,7 +18279,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -18118,7 +18289,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -18130,8 +18301,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -18140,7 +18315,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -18184,7 +18359,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -18210,6 +18385,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -19707,7 +19883,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -19715,7 +19893,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -19727,8 +19905,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -19737,7 +19919,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -19781,7 +19963,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -19807,6 +19989,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -20231,7 +20414,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -20239,7 +20424,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -20251,8 +20436,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -20261,7 +20450,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -20305,7 +20494,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -20331,6 +20520,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -20719,7 +20909,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -20727,7 +20919,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -20739,8 +20931,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -20749,7 +20945,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -20793,7 +20989,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -20819,6 +21015,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -21213,7 +21410,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -21221,7 +21420,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -21233,8 +21432,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -21243,7 +21446,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -21287,7 +21490,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -21313,6 +21516,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -21701,7 +21905,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -21709,7 +21915,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -21721,8 +21927,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -21731,7 +21941,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -21775,7 +21985,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -21801,6 +22011,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -22191,7 +22402,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -22199,7 +22412,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -22211,8 +22424,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -22221,7 +22438,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -22265,7 +22482,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -22291,6 +22508,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -25655,7 +25873,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -25663,7 +25883,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -25675,8 +25895,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -25685,7 +25909,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -25729,7 +25953,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -25755,6 +25979,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -26010,7 +26235,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -26018,7 +26245,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -26030,8 +26257,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -26040,7 +26271,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -26084,7 +26315,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -26110,6 +26341,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -29308,7 +29540,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -29316,7 +29550,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -29328,8 +29562,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -29338,7 +29576,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -29382,7 +29620,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -29408,6 +29646,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -29663,7 +29902,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -29671,7 +29912,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -29683,8 +29924,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -29693,7 +29938,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -29737,7 +29982,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -29763,6 +30008,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -31112,7 +31358,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -31120,7 +31368,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -31132,8 +31380,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -31142,7 +31394,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -31186,7 +31438,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -31212,6 +31464,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -31467,7 +31720,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -31475,7 +31730,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -31487,8 +31742,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -31497,7 +31756,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -31541,7 +31800,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -31567,6 +31826,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -32916,7 +33176,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -32924,7 +33186,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -32936,8 +33198,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -32946,7 +33212,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -32990,7 +33256,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -33016,6 +33282,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -33270,7 +33537,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -33278,7 +33547,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -33290,8 +33559,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -33300,7 +33573,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -33344,7 +33617,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -33370,6 +33643,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -34996,7 +35270,9 @@ urls?: ((URL | Link))[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -35004,7 +35280,7 @@ urls?: ((URL | Link))[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -35016,8 +35292,12 @@ urls?: ((URL | Link))[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -35026,7 +35306,7 @@ urls?: ((URL | Link))[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -35070,7 +35350,7 @@ urls?: ((URL | Link))[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -35096,6 +35376,7 @@ urls?: ((URL | Link))[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -36646,7 +36927,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -36654,7 +36937,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -36666,8 +36949,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -36676,7 +36963,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -36720,7 +37007,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -36746,6 +37033,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -36999,7 +37287,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -37007,7 +37297,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -37019,8 +37309,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -37029,7 +37323,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -37073,7 +37367,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -37099,6 +37393,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -38787,7 +39082,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -38795,7 +39092,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -38807,8 +39104,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -38817,7 +39118,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -38861,7 +39162,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -38887,6 +39188,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39142,7 +39444,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39150,7 +39454,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -39162,8 +39466,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39172,7 +39480,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39216,7 +39524,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -39242,6 +39550,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39497,7 +39806,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39505,7 +39816,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -39517,8 +39828,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39527,7 +39842,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39571,7 +39886,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -39597,6 +39912,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39852,7 +40168,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39860,7 +40178,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -39872,8 +40190,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39882,7 +40204,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39926,7 +40248,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -39952,6 +40274,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40221,7 +40544,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40229,7 +40554,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -40241,8 +40566,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40251,7 +40580,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -40295,7 +40624,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -40321,6 +40650,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40575,7 +40905,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40583,7 +40915,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -40595,8 +40927,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40605,7 +40941,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -40649,7 +40985,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -40675,6 +41011,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40929,7 +41266,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40937,7 +41276,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -40949,8 +41288,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40959,7 +41302,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41003,7 +41346,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -41029,6 +41372,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41283,7 +41627,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41291,7 +41637,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -41303,8 +41649,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -41313,7 +41663,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41357,7 +41707,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -41383,6 +41733,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41637,7 +41988,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41645,7 +41998,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -41657,8 +42010,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -41667,7 +42024,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41711,7 +42068,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -41737,6 +42094,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41991,7 +42349,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41999,7 +42359,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -42011,8 +42371,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42021,7 +42385,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42065,7 +42429,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -42091,6 +42455,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -42345,7 +42710,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -42353,7 +42720,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -42365,8 +42732,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42375,7 +42746,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42419,7 +42790,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -42445,6 +42816,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -42699,7 +43071,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -42707,7 +43081,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -42719,8 +43093,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42729,7 +43107,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42773,7 +43151,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -42799,6 +43177,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -44838,7 +45217,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -44846,7 +45227,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -44858,8 +45239,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -44868,7 +45253,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -44912,7 +45297,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -44938,6 +45323,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -46472,7 +46858,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -46480,7 +46868,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -46492,8 +46880,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -46502,7 +46894,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -46546,7 +46938,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -46572,6 +46964,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -46825,7 +47218,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -46833,7 +47228,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -46845,8 +47240,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -46855,7 +47254,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -46899,7 +47298,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -46925,6 +47324,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -48972,7 +49372,9 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -48980,7 +49382,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -48992,8 +49394,12 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -49002,7 +49408,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -49046,7 +49452,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -49072,6 +49478,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -50216,7 +50623,9 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -50224,7 +50633,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -50236,8 +50645,12 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -50246,7 +50659,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -50290,7 +50703,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -50316,6 +50729,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -51351,7 +51765,9 @@ controller?: Application | Group | Organization | Person | Service | URL | null; } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -51359,7 +51775,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -51371,8 +51787,12 @@ controller?: Application | Group | Organization | Person | Service | URL | null; // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -51381,7 +51801,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -51425,7 +51845,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -51451,6 +51871,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -58098,7 +58519,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -58106,7 +58529,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -58118,8 +58541,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -58128,7 +58555,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -58172,7 +58599,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -58198,6 +58625,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -58580,7 +59008,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -58588,7 +59018,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -58600,8 +59030,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -58610,7 +59044,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -58654,7 +59088,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -58680,6 +59114,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59116,7 +59551,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59124,7 +59561,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -59136,8 +59573,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59146,7 +59587,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59190,7 +59631,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -59216,6 +59657,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59491,7 +59933,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59499,7 +59943,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -59511,8 +59955,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59521,7 +59969,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59565,7 +60013,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -59591,6 +60039,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59863,7 +60312,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59871,7 +60322,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -59883,8 +60334,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59893,7 +60348,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59937,7 +60392,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -59963,6 +60418,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60221,7 +60677,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60229,7 +60687,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -60241,8 +60699,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60251,7 +60713,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -60295,7 +60757,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -60321,6 +60783,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60582,7 +61045,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60590,7 +61055,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -60602,8 +61067,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60612,7 +61081,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -60656,7 +61125,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -60682,6 +61151,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60941,7 +61411,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60949,7 +61421,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -60961,8 +61433,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60971,7 +61447,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61015,7 +61491,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -61041,6 +61517,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -61298,7 +61775,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -61306,7 +61785,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -61318,8 +61797,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -61328,7 +61811,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61372,7 +61855,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -61398,6 +61881,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -61655,7 +62139,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -61663,7 +62149,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -61675,8 +62161,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -61685,7 +62175,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61729,7 +62219,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -61755,6 +62245,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62009,7 +62500,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62017,7 +62510,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -62029,8 +62522,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62039,7 +62536,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62083,7 +62580,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -62109,6 +62606,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62443,7 +62941,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62451,7 +62951,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -62463,8 +62963,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62473,7 +62977,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62517,7 +63021,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -62543,6 +63047,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62832,7 +63337,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62840,7 +63347,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -62852,8 +63359,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62862,7 +63373,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62906,7 +63417,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -62932,6 +63443,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -63358,7 +63870,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -63366,7 +63880,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -63378,8 +63892,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -63388,7 +63906,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -63432,7 +63950,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -63458,6 +63976,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -67616,7 +68135,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -67624,7 +68145,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -67636,8 +68157,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -67646,7 +68171,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -67690,7 +68215,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -67716,6 +68241,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -67995,7 +68521,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -68003,7 +68531,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -68015,8 +68543,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -68025,7 +68557,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -68069,7 +68601,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -68095,6 +68627,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71210,7 +71743,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71218,7 +71753,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -71230,8 +71765,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71240,7 +71779,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71284,7 +71823,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -71310,6 +71849,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71565,7 +72105,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71573,7 +72115,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -71585,8 +72127,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71595,7 +72141,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71639,7 +72185,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -71665,6 +72211,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71918,7 +72465,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71926,7 +72475,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -71938,8 +72487,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71948,7 +72501,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71992,7 +72545,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -72018,6 +72571,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -77831,7 +78385,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -77839,7 +78395,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -77851,8 +78407,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -77861,7 +78421,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -77905,7 +78465,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -77931,6 +78491,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -78313,7 +78874,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -78321,7 +78884,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -78333,8 +78896,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -78343,7 +78910,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -78387,7 +78954,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -78413,6 +78980,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -78849,7 +79417,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -78857,7 +79427,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -78869,8 +79439,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -78879,7 +79453,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -78923,7 +79497,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -78949,6 +79523,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79224,7 +79799,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79232,7 +79809,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -79244,8 +79821,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79254,7 +79835,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -79298,7 +79879,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -79324,6 +79905,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79596,7 +80178,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79604,7 +80188,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -79616,8 +80200,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79626,7 +80214,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -79670,7 +80258,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -79696,6 +80284,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79954,7 +80543,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79962,7 +80553,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -79974,8 +80565,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79984,7 +80579,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80028,7 +80623,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -80054,6 +80649,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -80315,7 +80911,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -80323,7 +80921,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -80335,8 +80933,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -80345,7 +80947,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80389,7 +80991,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -80415,6 +81017,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -80674,7 +81277,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -80682,7 +81287,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -80694,8 +81299,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -80704,7 +81313,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80748,7 +81357,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -80774,6 +81383,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81031,7 +81641,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81039,7 +81651,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -81051,8 +81663,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81061,7 +81677,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81105,7 +81721,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -81131,6 +81747,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81388,7 +82005,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81396,7 +82015,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -81408,8 +82027,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81418,7 +82041,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81462,7 +82085,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -81488,6 +82111,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81742,7 +82366,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81750,7 +82376,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -81762,8 +82388,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81772,7 +82402,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81816,7 +82446,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -81842,6 +82472,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -82176,7 +82807,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -82184,7 +82817,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -82196,8 +82829,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -82206,7 +82843,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -82250,7 +82887,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -82276,6 +82913,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -82565,7 +83203,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -82573,7 +83213,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -82585,8 +83225,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -82595,7 +83239,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -82639,7 +83283,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -82665,6 +83309,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -83091,7 +83736,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -83099,7 +83746,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -83111,8 +83758,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -83121,7 +83772,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -83165,7 +83816,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -83191,6 +83842,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -86995,7 +87647,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -87003,7 +87657,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -87015,8 +87669,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -87025,7 +87683,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -87069,7 +87727,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -87095,6 +87753,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -92694,7 +93353,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -92702,7 +93363,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -92714,8 +93375,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -92724,7 +93389,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -92768,7 +93433,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -92794,6 +93459,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -93073,7 +93739,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -93081,7 +93749,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -93093,8 +93761,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -93103,7 +93775,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -93147,7 +93819,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -93173,6 +93845,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -94221,7 +94894,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -94229,7 +94904,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -94241,8 +94916,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -94251,7 +94930,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -94295,7 +94974,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -94321,6 +95000,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -96252,7 +96932,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -96260,7 +96942,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -96272,8 +96954,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -96282,7 +96968,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -96326,7 +97012,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -96352,6 +97038,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -96734,7 +97421,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -96742,7 +97431,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -96754,8 +97443,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -96764,7 +97457,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -96808,7 +97501,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -96834,6 +97527,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -97270,7 +97964,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -97278,7 +97974,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -97290,8 +97986,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -97300,7 +98000,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -97344,7 +98044,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -97370,6 +98070,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -97645,7 +98346,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -97653,7 +98356,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -97665,8 +98368,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -97675,7 +98382,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -97719,7 +98426,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -97745,6 +98452,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98017,7 +98725,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98025,7 +98735,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -98037,8 +98747,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98047,7 +98761,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98091,7 +98805,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -98117,6 +98831,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98375,7 +99090,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98383,7 +99100,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -98395,8 +99112,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98405,7 +99126,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98449,7 +99170,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -98475,6 +99196,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98736,7 +99458,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98744,7 +99468,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -98756,8 +99480,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98766,7 +99494,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98810,7 +99538,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -98836,6 +99564,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99095,7 +99824,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99103,7 +99834,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -99115,8 +99846,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99125,7 +99860,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99169,7 +99904,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -99195,6 +99930,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99452,7 +100188,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99460,7 +100198,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -99472,8 +100210,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99482,7 +100224,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99526,7 +100268,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -99552,6 +100294,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99809,7 +100552,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99817,7 +100562,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -99829,8 +100574,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99839,7 +100588,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99883,7 +100632,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -99909,6 +100658,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100163,7 +100913,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100171,7 +100923,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -100183,8 +100935,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -100193,7 +100949,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -100237,7 +100993,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -100263,6 +101019,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100597,7 +101354,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100605,7 +101364,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -100617,8 +101376,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -100627,7 +101390,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -100671,7 +101434,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -100697,6 +101460,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100986,7 +101750,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100994,7 +101760,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -101006,8 +101772,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -101016,7 +101786,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -101060,7 +101830,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -101086,6 +101856,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -101512,7 +102283,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -101520,7 +102293,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -101532,8 +102305,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -101542,7 +102319,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -101586,7 +102363,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -101612,6 +102389,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -106305,7 +107083,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -106313,7 +107093,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -106325,8 +107105,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -106335,7 +107119,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -106379,7 +107163,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -106405,6 +107189,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -106787,7 +107572,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -106795,7 +107582,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -106807,8 +107594,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -106817,7 +107608,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -106861,7 +107652,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -106887,6 +107678,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -107323,7 +108115,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -107331,7 +108125,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -107343,8 +108137,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -107353,7 +108151,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -107397,7 +108195,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -107423,6 +108221,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -107698,7 +108497,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -107706,7 +108507,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -107718,8 +108519,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -107728,7 +108533,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -107772,7 +108577,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -107798,6 +108603,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108070,7 +108876,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108078,7 +108886,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -108090,8 +108898,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108100,7 +108912,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108144,7 +108956,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -108170,6 +108982,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108428,7 +109241,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108436,7 +109251,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -108448,8 +109263,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108458,7 +109277,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108502,7 +109321,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -108528,6 +109347,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108789,7 +109609,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108797,7 +109619,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -108809,8 +109631,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108819,7 +109645,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108863,7 +109689,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -108889,6 +109715,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109148,7 +109975,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109156,7 +109985,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -109168,8 +109997,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109178,7 +110011,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109222,7 +110055,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -109248,6 +110081,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109505,7 +110339,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109513,7 +110349,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -109525,8 +110361,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109535,7 +110375,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109579,7 +110419,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -109605,6 +110445,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109862,7 +110703,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109870,7 +110713,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -109882,8 +110725,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109892,7 +110739,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109936,7 +110783,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -109962,6 +110809,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -110216,7 +111064,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -110224,7 +111074,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -110236,8 +111086,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -110246,7 +111100,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -110290,7 +111144,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -110316,6 +111170,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -110650,7 +111505,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -110658,7 +111515,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -110670,8 +111527,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -110680,7 +111541,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -110724,7 +111585,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -110750,6 +111611,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -111039,7 +111901,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -111047,7 +111911,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -111059,8 +111923,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -111069,7 +111937,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -111113,7 +111981,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -111139,6 +112007,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -111565,7 +112434,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -111573,7 +112444,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -111585,8 +112456,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -111595,7 +112470,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -111639,7 +112514,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -111665,6 +112540,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -116139,7 +117015,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -116147,7 +117025,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -116159,8 +117037,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -116169,7 +117051,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -116213,7 +117095,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -116239,6 +117121,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -117250,7 +118133,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -117258,7 +118143,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -117270,8 +118155,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -117280,7 +118169,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -117324,7 +118213,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -117350,6 +118239,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -117611,7 +118501,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -117619,7 +118511,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -117631,8 +118523,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -117641,7 +118537,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -117685,7 +118581,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -117711,6 +118607,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -118002,7 +118899,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -118010,7 +118909,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -118022,8 +118921,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -118032,7 +118935,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -118076,7 +118979,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -118102,6 +119005,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -118381,7 +119285,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -118389,7 +119295,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -118401,8 +119307,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -118411,7 +119321,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -118455,7 +119365,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -118481,6 +119391,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -120717,7 +121628,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -120725,7 +121638,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -120737,8 +121650,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -120747,7 +121664,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -120791,7 +121708,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -120817,6 +121734,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -121074,7 +121992,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -121082,7 +122002,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -121094,8 +122014,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -121104,7 +122028,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -121148,7 +122072,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -121174,6 +122098,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -121558,7 +122483,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -121566,7 +122493,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -121578,8 +122505,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -121588,7 +122519,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -121632,7 +122563,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -121658,6 +122589,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -124216,7 +125148,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -124224,7 +125158,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -124236,8 +125170,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -124246,7 +125184,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -124290,7 +125228,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -124316,6 +125254,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -124698,7 +125637,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -124706,7 +125647,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -124718,8 +125659,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -124728,7 +125673,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -124772,7 +125717,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -124798,6 +125743,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125234,7 +126180,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125242,7 +126190,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -125254,8 +126202,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -125264,7 +126216,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -125308,7 +126260,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -125334,6 +126286,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125609,7 +126562,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125617,7 +126572,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -125629,8 +126584,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -125639,7 +126598,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -125683,7 +126642,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -125709,6 +126668,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125981,7 +126941,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125989,7 +126951,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -126001,8 +126963,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126011,7 +126977,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126055,7 +127021,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -126081,6 +127047,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -126339,7 +127306,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -126347,7 +127316,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -126359,8 +127328,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126369,7 +127342,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126413,7 +127386,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -126439,6 +127412,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -126700,7 +127674,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -126708,7 +127684,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -126720,8 +127696,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126730,7 +127710,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126774,7 +127754,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -126800,6 +127780,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127059,7 +128040,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127067,7 +128050,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -127079,8 +128062,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127089,7 +128076,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127133,7 +128120,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -127159,6 +128146,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127416,7 +128404,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127424,7 +128414,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -127436,8 +128426,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127446,7 +128440,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127490,7 +128484,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -127516,6 +128510,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127773,7 +128768,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127781,7 +128778,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -127793,8 +128790,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127803,7 +128804,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127847,7 +128848,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -127873,6 +128874,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128127,7 +129129,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128135,7 +129139,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -128147,8 +129151,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128157,7 +129165,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -128201,7 +129209,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -128227,6 +129235,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128561,7 +129570,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128569,7 +129580,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -128581,8 +129592,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128591,7 +129606,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -128635,7 +129650,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -128661,6 +129676,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128950,7 +129966,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128958,7 +129976,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -128970,8 +129988,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128980,7 +130002,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -129024,7 +130046,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -129050,6 +130072,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -129476,7 +130499,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -129484,7 +130509,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -129496,8 +130521,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -129506,7 +130535,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -129550,7 +130579,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -129576,6 +130605,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); diff --git a/packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap b/packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap index 5f4c848cb..49ec38e64 100644 --- a/packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap +++ b/packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap @@ -28,6 +28,7 @@ import { } from \\"@fedify/vocab-runtime\\"; import { compactJsonLdCache, + createScopedContextLoader, getJsonLdContext, isTrustedIriOrigin, normalizeJsonLdIris @@ -2353,7 +2354,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -2361,7 +2364,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -2373,8 +2376,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -2383,7 +2390,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -2427,7 +2434,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -2453,6 +2460,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -2732,7 +2740,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -2740,7 +2750,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -2752,8 +2762,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -2762,7 +2776,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -2806,7 +2820,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -2832,6 +2846,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -3256,7 +3271,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -3264,7 +3281,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -3276,8 +3293,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -3286,7 +3307,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -3330,7 +3351,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -3356,6 +3377,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -3771,7 +3793,9 @@ get contents(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -3779,7 +3803,7 @@ get contents(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -3791,8 +3815,12 @@ get contents(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -3801,7 +3829,7 @@ get contents(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -3845,7 +3873,7 @@ get contents(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -3871,6 +3899,7 @@ get contents(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -4187,7 +4216,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -4195,7 +4226,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -4207,8 +4238,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -4217,7 +4252,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -4261,7 +4296,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -4287,6 +4322,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -4555,7 +4591,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -4563,7 +4601,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -4575,8 +4613,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -4585,7 +4627,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -4629,7 +4671,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -4655,6 +4697,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -5064,7 +5107,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -5072,7 +5117,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -5084,8 +5129,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -5094,7 +5143,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -5138,7 +5187,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -5164,6 +5213,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -5573,7 +5623,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -5581,7 +5633,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -5593,8 +5645,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -5603,7 +5659,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -5647,7 +5703,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -5673,6 +5729,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -6068,7 +6125,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -6076,7 +6135,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -6088,8 +6147,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -6098,7 +6161,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -6142,7 +6205,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -6168,6 +6231,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -6563,7 +6627,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -6571,7 +6637,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -6583,8 +6649,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -6593,7 +6663,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -6637,7 +6707,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -6663,6 +6733,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7069,7 +7140,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7077,7 +7150,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -7089,8 +7162,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7099,7 +7176,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7143,7 +7220,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -7169,6 +7246,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7424,7 +7502,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7432,7 +7512,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -7444,8 +7524,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7454,7 +7538,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7498,7 +7582,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -7524,6 +7608,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7785,7 +7870,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7793,7 +7880,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -7805,8 +7892,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7815,7 +7906,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7859,7 +7950,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -7885,6 +7976,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8146,7 +8238,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8154,7 +8248,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -8166,8 +8260,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8176,7 +8274,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -8220,7 +8318,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -8246,6 +8344,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8541,7 +8640,9 @@ get summaries(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8549,7 +8650,7 @@ get summaries(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -8561,8 +8662,12 @@ get summaries(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8571,7 +8676,7 @@ get summaries(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -8615,7 +8720,7 @@ get summaries(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -8641,6 +8746,7 @@ get summaries(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8946,7 +9052,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8954,7 +9062,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -8966,8 +9074,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8976,7 +9088,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9020,7 +9132,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -9046,6 +9158,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -9432,7 +9545,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -9440,7 +9555,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -9452,8 +9567,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -9462,7 +9581,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9506,7 +9625,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -9532,6 +9651,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -9918,7 +10038,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -9926,7 +10048,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -9938,8 +10060,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -9948,7 +10074,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9992,7 +10118,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -10018,6 +10144,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -10404,7 +10531,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -10412,7 +10541,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -10424,8 +10553,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -10434,7 +10567,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -10478,7 +10611,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -10504,6 +10637,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -10954,7 +11088,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -10962,7 +11098,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -10974,8 +11110,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -10984,7 +11124,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11028,7 +11168,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -11054,6 +11194,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -11477,7 +11618,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -11485,7 +11628,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -11497,8 +11640,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -11507,7 +11654,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11551,7 +11698,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -11577,6 +11724,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -11832,7 +11980,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -11840,7 +11990,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -11852,8 +12002,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -11862,7 +12016,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11906,7 +12060,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -11932,6 +12086,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -12187,7 +12342,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -12195,7 +12352,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -12207,8 +12364,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -12217,7 +12378,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -12261,7 +12422,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -12287,6 +12448,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -17729,7 +17891,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -17737,7 +17901,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -17749,8 +17913,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -17759,7 +17927,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -17803,7 +17971,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -17829,6 +17997,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -18108,7 +18277,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -18116,7 +18287,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -18128,8 +18299,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -18138,7 +18313,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -18182,7 +18357,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -18208,6 +18383,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -19705,7 +19881,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -19713,7 +19891,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -19725,8 +19903,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -19735,7 +19917,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -19779,7 +19961,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -19805,6 +19987,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -20229,7 +20412,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -20237,7 +20422,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -20249,8 +20434,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -20259,7 +20448,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -20303,7 +20492,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -20329,6 +20518,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -20717,7 +20907,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -20725,7 +20917,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -20737,8 +20929,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -20747,7 +20943,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -20791,7 +20987,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -20817,6 +21013,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -21211,7 +21408,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -21219,7 +21418,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -21231,8 +21430,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -21241,7 +21444,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -21285,7 +21488,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -21311,6 +21514,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -21699,7 +21903,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -21707,7 +21913,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -21719,8 +21925,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -21729,7 +21939,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -21773,7 +21983,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -21799,6 +22009,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -22189,7 +22400,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -22197,7 +22410,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -22209,8 +22422,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -22219,7 +22436,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -22263,7 +22480,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -22289,6 +22506,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -25653,7 +25871,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -25661,7 +25881,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -25673,8 +25893,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -25683,7 +25907,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -25727,7 +25951,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -25753,6 +25977,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -26008,7 +26233,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -26016,7 +26243,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -26028,8 +26255,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -26038,7 +26269,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -26082,7 +26313,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -26108,6 +26339,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -29306,7 +29538,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -29314,7 +29548,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -29326,8 +29560,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -29336,7 +29574,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -29380,7 +29618,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -29406,6 +29644,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -29661,7 +29900,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -29669,7 +29910,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -29681,8 +29922,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -29691,7 +29936,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -29735,7 +29980,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -29761,6 +30006,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -31110,7 +31356,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -31118,7 +31366,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -31130,8 +31378,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -31140,7 +31392,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -31184,7 +31436,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -31210,6 +31462,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -31465,7 +31718,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -31473,7 +31728,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -31485,8 +31740,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -31495,7 +31754,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -31539,7 +31798,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -31565,6 +31824,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -32914,7 +33174,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -32922,7 +33184,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -32934,8 +33196,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -32944,7 +33210,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -32988,7 +33254,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -33014,6 +33280,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -33268,7 +33535,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -33276,7 +33545,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -33288,8 +33557,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -33298,7 +33571,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -33342,7 +33615,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -33368,6 +33641,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -34994,7 +35268,9 @@ urls?: ((URL | Link))[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -35002,7 +35278,7 @@ urls?: ((URL | Link))[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -35014,8 +35290,12 @@ urls?: ((URL | Link))[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -35024,7 +35304,7 @@ urls?: ((URL | Link))[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -35068,7 +35348,7 @@ urls?: ((URL | Link))[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -35094,6 +35374,7 @@ urls?: ((URL | Link))[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -36644,7 +36925,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -36652,7 +36935,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -36664,8 +36947,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -36674,7 +36961,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -36718,7 +37005,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -36744,6 +37031,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -36997,7 +37285,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -37005,7 +37295,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -37017,8 +37307,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -37027,7 +37321,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -37071,7 +37365,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -37097,6 +37391,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -38785,7 +39080,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -38793,7 +39090,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -38805,8 +39102,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -38815,7 +39116,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -38859,7 +39160,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -38885,6 +39186,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39140,7 +39442,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39148,7 +39452,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -39160,8 +39464,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39170,7 +39478,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39214,7 +39522,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -39240,6 +39548,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39495,7 +39804,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39503,7 +39814,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -39515,8 +39826,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39525,7 +39840,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39569,7 +39884,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -39595,6 +39910,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39850,7 +40166,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39858,7 +40176,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -39870,8 +40188,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39880,7 +40202,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39924,7 +40246,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -39950,6 +40272,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40219,7 +40542,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40227,7 +40552,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -40239,8 +40564,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40249,7 +40578,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -40293,7 +40622,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -40319,6 +40648,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40573,7 +40903,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40581,7 +40913,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -40593,8 +40925,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40603,7 +40939,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -40647,7 +40983,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -40673,6 +41009,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40927,7 +41264,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40935,7 +41274,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -40947,8 +41286,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40957,7 +41300,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41001,7 +41344,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -41027,6 +41370,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41281,7 +41625,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41289,7 +41635,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -41301,8 +41647,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -41311,7 +41661,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41355,7 +41705,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -41381,6 +41731,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41635,7 +41986,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41643,7 +41996,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -41655,8 +42008,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -41665,7 +42022,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41709,7 +42066,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -41735,6 +42092,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41989,7 +42347,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41997,7 +42357,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -42009,8 +42369,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42019,7 +42383,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42063,7 +42427,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -42089,6 +42453,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -42343,7 +42708,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -42351,7 +42718,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -42363,8 +42730,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42373,7 +42744,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42417,7 +42788,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -42443,6 +42814,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -42697,7 +43069,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -42705,7 +43079,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -42717,8 +43091,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42727,7 +43105,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42771,7 +43149,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -42797,6 +43175,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -44836,7 +45215,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -44844,7 +45225,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -44856,8 +45237,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -44866,7 +45251,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -44910,7 +45295,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -44936,6 +45321,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -46470,7 +46856,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -46478,7 +46866,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -46490,8 +46878,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -46500,7 +46892,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -46544,7 +46936,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -46570,6 +46962,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -46823,7 +47216,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -46831,7 +47226,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -46843,8 +47238,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -46853,7 +47252,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -46897,7 +47296,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -46923,6 +47322,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -48970,7 +49370,9 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -48978,7 +49380,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -48990,8 +49392,12 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -49000,7 +49406,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -49044,7 +49450,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -49070,6 +49476,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL | contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -50214,7 +50621,9 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -50222,7 +50631,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -50234,8 +50643,12 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -50244,7 +50657,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -50288,7 +50701,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -50314,6 +50727,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -51349,7 +51763,9 @@ controller?: Application | Group | Organization | Person | Service | URL | null; } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -51357,7 +51773,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -51369,8 +51785,12 @@ controller?: Application | Group | Organization | Person | Service | URL | null; // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -51379,7 +51799,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -51423,7 +51843,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -51449,6 +51869,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -58096,7 +58517,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -58104,7 +58527,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -58116,8 +58539,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -58126,7 +58553,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -58170,7 +58597,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -58196,6 +58623,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -58578,7 +59006,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -58586,7 +59016,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -58598,8 +59028,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -58608,7 +59042,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -58652,7 +59086,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -58678,6 +59112,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59114,7 +59549,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59122,7 +59559,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -59134,8 +59571,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59144,7 +59585,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59188,7 +59629,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -59214,6 +59655,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59489,7 +59931,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59497,7 +59941,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -59509,8 +59953,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59519,7 +59967,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59563,7 +60011,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -59589,6 +60037,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59861,7 +60310,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59869,7 +60320,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -59881,8 +60332,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59891,7 +60346,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59935,7 +60390,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -59961,6 +60416,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60219,7 +60675,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60227,7 +60685,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -60239,8 +60697,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60249,7 +60711,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -60293,7 +60755,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -60319,6 +60781,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60580,7 +61043,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60588,7 +61053,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -60600,8 +61065,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60610,7 +61079,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -60654,7 +61123,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -60680,6 +61149,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60939,7 +61409,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60947,7 +61419,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -60959,8 +61431,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60969,7 +61445,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61013,7 +61489,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -61039,6 +61515,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -61296,7 +61773,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -61304,7 +61783,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -61316,8 +61795,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -61326,7 +61809,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61370,7 +61853,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -61396,6 +61879,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -61653,7 +62137,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -61661,7 +62147,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -61673,8 +62159,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -61683,7 +62173,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61727,7 +62217,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -61753,6 +62243,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62007,7 +62498,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62015,7 +62508,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -62027,8 +62520,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62037,7 +62534,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62081,7 +62578,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -62107,6 +62604,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62441,7 +62939,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62449,7 +62949,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -62461,8 +62961,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62471,7 +62975,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62515,7 +63019,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -62541,6 +63045,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62830,7 +63335,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62838,7 +63345,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -62850,8 +63357,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62860,7 +63371,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62904,7 +63415,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -62930,6 +63441,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -63356,7 +63868,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -63364,7 +63878,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -63376,8 +63890,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -63386,7 +63904,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -63430,7 +63948,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -63456,6 +63974,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -67614,7 +68133,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -67622,7 +68143,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -67634,8 +68155,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -67644,7 +68169,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -67688,7 +68213,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -67714,6 +68239,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -67993,7 +68519,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -68001,7 +68529,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -68013,8 +68541,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -68023,7 +68555,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -68067,7 +68599,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -68093,6 +68625,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71208,7 +71741,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71216,7 +71751,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -71228,8 +71763,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71238,7 +71777,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71282,7 +71821,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -71308,6 +71847,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71563,7 +72103,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71571,7 +72113,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -71583,8 +72125,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71593,7 +72139,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71637,7 +72183,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -71663,6 +72209,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71916,7 +72463,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71924,7 +72473,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -71936,8 +72485,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71946,7 +72499,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71990,7 +72543,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -72016,6 +72569,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -77829,7 +78383,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -77837,7 +78393,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -77849,8 +78405,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -77859,7 +78419,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -77903,7 +78463,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -77929,6 +78489,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -78311,7 +78872,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -78319,7 +78882,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -78331,8 +78894,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -78341,7 +78908,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -78385,7 +78952,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -78411,6 +78978,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -78847,7 +79415,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -78855,7 +79425,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -78867,8 +79437,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -78877,7 +79451,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -78921,7 +79495,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -78947,6 +79521,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79222,7 +79797,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79230,7 +79807,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -79242,8 +79819,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79252,7 +79833,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -79296,7 +79877,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -79322,6 +79903,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79594,7 +80176,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79602,7 +80186,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -79614,8 +80198,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79624,7 +80212,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -79668,7 +80256,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -79694,6 +80282,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79952,7 +80541,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79960,7 +80551,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -79972,8 +80563,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79982,7 +80577,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80026,7 +80621,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -80052,6 +80647,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -80313,7 +80909,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -80321,7 +80919,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -80333,8 +80931,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -80343,7 +80945,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80387,7 +80989,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -80413,6 +81015,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -80672,7 +81275,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -80680,7 +81285,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -80692,8 +81297,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -80702,7 +81311,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80746,7 +81355,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -80772,6 +81381,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81029,7 +81639,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81037,7 +81649,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -81049,8 +81661,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81059,7 +81675,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81103,7 +81719,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -81129,6 +81745,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81386,7 +82003,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81394,7 +82013,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -81406,8 +82025,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81416,7 +82039,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81460,7 +82083,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -81486,6 +82109,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81740,7 +82364,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81748,7 +82374,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -81760,8 +82386,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81770,7 +82400,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81814,7 +82444,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -81840,6 +82470,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -82174,7 +82805,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -82182,7 +82815,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -82194,8 +82827,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -82204,7 +82841,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -82248,7 +82885,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -82274,6 +82911,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -82563,7 +83201,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -82571,7 +83211,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -82583,8 +83223,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -82593,7 +83237,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -82637,7 +83281,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -82663,6 +83307,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -83089,7 +83734,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -83097,7 +83744,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -83109,8 +83756,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -83119,7 +83770,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -83163,7 +83814,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -83189,6 +83840,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -86993,7 +87645,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -87001,7 +87655,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -87013,8 +87667,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -87023,7 +87681,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -87067,7 +87725,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -87093,6 +87751,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -92692,7 +93351,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -92700,7 +93361,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -92712,8 +93373,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -92722,7 +93387,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -92766,7 +93431,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -92792,6 +93457,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -93071,7 +93737,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -93079,7 +93747,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -93091,8 +93759,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -93101,7 +93773,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -93145,7 +93817,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -93171,6 +93843,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -94219,7 +94892,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -94227,7 +94902,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -94239,8 +94914,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -94249,7 +94928,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -94293,7 +94972,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -94319,6 +94998,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -96250,7 +96930,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -96258,7 +96940,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -96270,8 +96952,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -96280,7 +96966,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -96324,7 +97010,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -96350,6 +97036,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -96732,7 +97419,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -96740,7 +97429,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -96752,8 +97441,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -96762,7 +97455,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -96806,7 +97499,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -96832,6 +97525,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -97268,7 +97962,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -97276,7 +97972,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -97288,8 +97984,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -97298,7 +97998,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -97342,7 +98042,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -97368,6 +98068,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -97643,7 +98344,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -97651,7 +98354,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -97663,8 +98366,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -97673,7 +98380,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -97717,7 +98424,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -97743,6 +98450,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98015,7 +98723,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98023,7 +98733,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -98035,8 +98745,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98045,7 +98759,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98089,7 +98803,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -98115,6 +98829,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98373,7 +99088,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98381,7 +99098,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -98393,8 +99110,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98403,7 +99124,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98447,7 +99168,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -98473,6 +99194,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98734,7 +99456,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98742,7 +99466,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -98754,8 +99478,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98764,7 +99492,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98808,7 +99536,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -98834,6 +99562,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99093,7 +99822,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99101,7 +99832,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -99113,8 +99844,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99123,7 +99858,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99167,7 +99902,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -99193,6 +99928,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99450,7 +100186,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99458,7 +100196,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -99470,8 +100208,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99480,7 +100222,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99524,7 +100266,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -99550,6 +100292,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99807,7 +100550,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99815,7 +100560,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -99827,8 +100572,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99837,7 +100586,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99881,7 +100630,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -99907,6 +100656,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100161,7 +100911,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100169,7 +100921,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -100181,8 +100933,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -100191,7 +100947,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -100235,7 +100991,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -100261,6 +101017,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100595,7 +101352,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100603,7 +101362,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -100615,8 +101374,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -100625,7 +101388,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -100669,7 +101432,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -100695,6 +101458,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100984,7 +101748,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100992,7 +101758,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -101004,8 +101770,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -101014,7 +101784,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -101058,7 +101828,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -101084,6 +101854,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -101510,7 +102281,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -101518,7 +102291,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -101530,8 +102303,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -101540,7 +102317,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -101584,7 +102361,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -101610,6 +102387,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -106303,7 +107081,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -106311,7 +107091,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -106323,8 +107103,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -106333,7 +107117,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -106377,7 +107161,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -106403,6 +107187,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -106785,7 +107570,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -106793,7 +107580,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -106805,8 +107592,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -106815,7 +107606,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -106859,7 +107650,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -106885,6 +107676,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -107321,7 +108113,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -107329,7 +108123,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -107341,8 +108135,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -107351,7 +108149,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -107395,7 +108193,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -107421,6 +108219,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -107696,7 +108495,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -107704,7 +108505,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -107716,8 +108517,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -107726,7 +108531,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -107770,7 +108575,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -107796,6 +108601,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108068,7 +108874,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108076,7 +108884,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -108088,8 +108896,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108098,7 +108910,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108142,7 +108954,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -108168,6 +108980,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108426,7 +109239,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108434,7 +109249,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -108446,8 +109261,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108456,7 +109275,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108500,7 +109319,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -108526,6 +109345,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108787,7 +109607,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108795,7 +109617,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -108807,8 +109629,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108817,7 +109643,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108861,7 +109687,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -108887,6 +109713,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109146,7 +109973,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109154,7 +109983,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -109166,8 +109995,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109176,7 +110009,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109220,7 +110053,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -109246,6 +110079,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109503,7 +110337,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109511,7 +110347,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -109523,8 +110359,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109533,7 +110373,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109577,7 +110417,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -109603,6 +110443,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109860,7 +110701,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109868,7 +110711,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -109880,8 +110723,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109890,7 +110737,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109934,7 +110781,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -109960,6 +110807,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -110214,7 +111062,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -110222,7 +111072,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -110234,8 +111084,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -110244,7 +111098,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -110288,7 +111142,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -110314,6 +111168,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -110648,7 +111503,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -110656,7 +111513,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -110668,8 +111525,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -110678,7 +111539,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -110722,7 +111583,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -110748,6 +111609,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -111037,7 +111899,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -111045,7 +111909,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -111057,8 +111921,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -111067,7 +111935,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -111111,7 +111979,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -111137,6 +112005,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -111563,7 +112432,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -111571,7 +112442,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -111583,8 +112454,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -111593,7 +112468,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -111637,7 +112512,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -111663,6 +112538,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -116137,7 +117013,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -116145,7 +117023,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -116157,8 +117035,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -116167,7 +117049,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -116211,7 +117093,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -116237,6 +117119,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -117248,7 +118131,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -117256,7 +118141,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -117268,8 +118153,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -117278,7 +118167,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -117322,7 +118211,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -117348,6 +118237,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -117609,7 +118499,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -117617,7 +118509,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -117629,8 +118521,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -117639,7 +118535,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -117683,7 +118579,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -117709,6 +118605,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -118000,7 +118897,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -118008,7 +118907,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -118020,8 +118919,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -118030,7 +118933,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -118074,7 +118977,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -118100,6 +119003,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -118379,7 +119283,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -118387,7 +119293,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -118399,8 +119305,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -118409,7 +119319,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -118453,7 +119363,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -118479,6 +119389,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -120715,7 +121626,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -120723,7 +121636,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -120735,8 +121648,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -120745,7 +121662,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -120789,7 +121706,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -120815,6 +121732,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -121072,7 +121990,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -121080,7 +122000,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -121092,8 +122012,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -121102,7 +122026,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -121146,7 +122070,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -121172,6 +122096,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -121556,7 +122481,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -121564,7 +122491,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -121576,8 +122503,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -121586,7 +122517,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -121630,7 +122561,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -121656,6 +122587,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -124214,7 +125146,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -124222,7 +125156,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -124234,8 +125168,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -124244,7 +125182,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -124288,7 +125226,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -124314,6 +125252,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -124696,7 +125635,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -124704,7 +125645,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -124716,8 +125657,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -124726,7 +125671,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -124770,7 +125715,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -124796,6 +125741,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125232,7 +126178,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125240,7 +126188,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -125252,8 +126200,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -125262,7 +126214,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -125306,7 +126258,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -125332,6 +126284,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125607,7 +126560,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125615,7 +126570,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -125627,8 +126582,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -125637,7 +126596,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -125681,7 +126640,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -125707,6 +126666,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125979,7 +126939,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125987,7 +126949,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -125999,8 +126961,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126009,7 +126975,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126053,7 +127019,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -126079,6 +127045,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -126337,7 +127304,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -126345,7 +127314,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -126357,8 +127326,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126367,7 +127340,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126411,7 +127384,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -126437,6 +127410,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -126698,7 +127672,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -126706,7 +127682,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -126718,8 +127694,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126728,7 +127708,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126772,7 +127752,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -126798,6 +127778,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127057,7 +128038,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127065,7 +128048,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -127077,8 +128060,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127087,7 +128074,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127131,7 +128118,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -127157,6 +128144,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127414,7 +128402,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127422,7 +128412,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -127434,8 +128424,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127444,7 +128438,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127488,7 +128482,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -127514,6 +128508,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127771,7 +128766,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127779,7 +128776,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -127791,8 +128788,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127801,7 +128802,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127845,7 +128846,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -127871,6 +128872,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128125,7 +129127,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128133,7 +129137,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -128145,8 +129149,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128155,7 +129163,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -128199,7 +129207,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -128225,6 +129233,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128559,7 +129568,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128567,7 +129578,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -128579,8 +129590,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128589,7 +129604,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -128633,7 +129648,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -128659,6 +129674,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128948,7 +129964,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128956,7 +129974,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -128968,8 +129986,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128978,7 +130000,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -129022,7 +130044,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -129048,6 +130070,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -129474,7 +130497,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -129482,7 +130507,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to fetch {url}: {error}\\", { error, url: lookupUrl } ); @@ -129494,8 +130519,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -129504,7 +130533,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -129548,7 +130577,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger([\\"fedify\\", \\"vocab\\"]).error( + getLogger([\\"fedify\\", \\"vocab\\"]).warn( \\"Failed to parse {url}: {error}\\", { error: e, url: lookupUrl } ); @@ -129574,6 +130603,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); diff --git a/packages/vocab-tools/src/__snapshots__/class.test.ts.snap b/packages/vocab-tools/src/__snapshots__/class.test.ts.snap index 2b3ddddd0..57129b8af 100644 --- a/packages/vocab-tools/src/__snapshots__/class.test.ts.snap +++ b/packages/vocab-tools/src/__snapshots__/class.test.ts.snap @@ -30,6 +30,7 @@ import { } from "@fedify/vocab-runtime"; import { compactJsonLdCache, + createScopedContextLoader, getJsonLdContext, isTrustedIriOrigin, normalizeJsonLdIris @@ -2355,7 +2356,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -2363,7 +2366,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -2375,8 +2378,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -2385,7 +2392,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -2429,7 +2436,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -2455,6 +2462,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -2734,7 +2742,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -2742,7 +2752,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -2754,8 +2764,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -2764,7 +2778,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -2808,7 +2822,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -2834,6 +2848,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -3258,7 +3273,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -3266,7 +3283,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -3278,8 +3295,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -3288,7 +3309,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -3332,7 +3353,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -3358,6 +3379,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -3773,7 +3795,9 @@ get contents(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -3781,7 +3805,7 @@ get contents(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -3793,8 +3817,12 @@ get contents(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -3803,7 +3831,7 @@ get contents(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -3847,7 +3875,7 @@ get contents(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -3873,6 +3901,7 @@ get contents(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -4189,7 +4218,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -4197,7 +4228,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -4209,8 +4240,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -4219,7 +4254,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -4263,7 +4298,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -4289,6 +4324,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -4557,7 +4593,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -4565,7 +4603,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -4577,8 +4615,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -4587,7 +4629,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -4631,7 +4673,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -4657,6 +4699,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -5066,7 +5109,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -5074,7 +5119,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -5086,8 +5131,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -5096,7 +5145,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -5140,7 +5189,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -5166,6 +5215,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -5575,7 +5625,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -5583,7 +5635,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -5595,8 +5647,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -5605,7 +5661,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -5649,7 +5705,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -5675,6 +5731,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -6070,7 +6127,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -6078,7 +6137,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -6090,8 +6149,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -6100,7 +6163,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -6144,7 +6207,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -6170,6 +6233,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -6565,7 +6629,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -6573,7 +6639,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -6585,8 +6651,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -6595,7 +6665,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -6639,7 +6709,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -6665,6 +6735,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7071,7 +7142,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7079,7 +7152,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -7091,8 +7164,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7101,7 +7178,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7145,7 +7222,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -7171,6 +7248,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7426,7 +7504,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7434,7 +7514,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -7446,8 +7526,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7456,7 +7540,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7500,7 +7584,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -7526,6 +7610,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -7787,7 +7872,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -7795,7 +7882,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -7807,8 +7894,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -7817,7 +7908,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -7861,7 +7952,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -7887,6 +7978,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8148,7 +8240,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8156,7 +8250,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -8168,8 +8262,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8178,7 +8276,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -8222,7 +8320,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -8248,6 +8346,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8543,7 +8642,9 @@ get summaries(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8551,7 +8652,7 @@ get summaries(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -8563,8 +8664,12 @@ get summaries(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8573,7 +8678,7 @@ get summaries(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -8617,7 +8722,7 @@ get summaries(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -8643,6 +8748,7 @@ get summaries(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -8948,7 +9054,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -8956,7 +9064,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -8968,8 +9076,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -8978,7 +9090,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9022,7 +9134,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -9048,6 +9160,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -9434,7 +9547,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -9442,7 +9557,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -9454,8 +9569,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -9464,7 +9583,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9508,7 +9627,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -9534,6 +9653,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -9920,7 +10040,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -9928,7 +10050,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -9940,8 +10062,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -9950,7 +10076,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -9994,7 +10120,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -10020,6 +10146,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -10406,7 +10533,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -10414,7 +10543,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -10426,8 +10555,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -10436,7 +10569,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -10480,7 +10613,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -10506,6 +10639,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -10956,7 +11090,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -10964,7 +11100,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -10976,8 +11112,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -10986,7 +11126,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11030,7 +11170,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -11056,6 +11196,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -11479,7 +11620,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -11487,7 +11630,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -11499,8 +11642,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -11509,7 +11656,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11553,7 +11700,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -11579,6 +11726,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -11834,7 +11982,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -11842,7 +11992,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -11854,8 +12004,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -11864,7 +12018,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -11908,7 +12062,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -11934,6 +12088,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -12189,7 +12344,9 @@ get urls(): ((URL | Link))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -12197,7 +12354,7 @@ get urls(): ((URL | Link))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -12209,8 +12366,12 @@ get urls(): ((URL | Link))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -12219,7 +12380,7 @@ get urls(): ((URL | Link))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -12263,7 +12424,7 @@ get urls(): ((URL | Link))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -12289,6 +12450,7 @@ get urls(): ((URL | Link))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -17731,7 +17893,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -17739,7 +17903,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -17751,8 +17915,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -17761,7 +17929,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -17805,7 +17973,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -17831,6 +17999,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -18110,7 +18279,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -18118,7 +18289,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -18130,8 +18301,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -18140,7 +18315,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -18184,7 +18359,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -18210,6 +18385,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -19707,7 +19883,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -19715,7 +19893,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -19727,8 +19905,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -19737,7 +19919,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -19781,7 +19963,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -19807,6 +19989,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -20231,7 +20414,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -20239,7 +20424,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -20251,8 +20436,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -20261,7 +20450,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -20305,7 +20494,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -20331,6 +20520,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -20719,7 +20909,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -20727,7 +20919,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -20739,8 +20931,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -20749,7 +20945,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -20793,7 +20989,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -20819,6 +21015,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -21213,7 +21410,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -21221,7 +21420,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -21233,8 +21432,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -21243,7 +21446,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -21287,7 +21490,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -21313,6 +21516,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -21701,7 +21905,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -21709,7 +21915,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -21721,8 +21927,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -21731,7 +21941,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -21775,7 +21985,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -21801,6 +22011,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -22191,7 +22402,9 @@ instruments?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -22199,7 +22412,7 @@ instruments?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -22211,8 +22424,12 @@ instruments?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -22221,7 +22438,7 @@ instruments?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -22265,7 +22482,7 @@ instruments?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -22291,6 +22508,7 @@ instruments?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -25655,7 +25873,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -25663,7 +25883,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -25675,8 +25895,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -25685,7 +25909,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -25729,7 +25953,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -25755,6 +25979,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -26010,7 +26235,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -26018,7 +26245,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -26030,8 +26257,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -26040,7 +26271,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -26084,7 +26315,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -26110,6 +26341,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -29308,7 +29540,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -29316,7 +29550,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -29328,8 +29562,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -29338,7 +29576,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -29382,7 +29620,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -29408,6 +29646,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -29663,7 +29902,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -29671,7 +29912,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -29683,8 +29924,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -29693,7 +29938,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -29737,7 +29982,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -29763,6 +30008,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -31112,7 +31358,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -31120,7 +31368,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -31132,8 +31380,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -31142,7 +31394,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -31186,7 +31438,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -31212,6 +31464,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -31467,7 +31720,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -31475,7 +31730,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -31487,8 +31742,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -31497,7 +31756,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -31541,7 +31800,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -31567,6 +31826,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -32916,7 +33176,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -32924,7 +33186,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -32936,8 +33198,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -32946,7 +33212,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -32990,7 +33256,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -33016,6 +33282,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -33270,7 +33537,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -33278,7 +33547,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -33290,8 +33559,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -33300,7 +33573,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -33344,7 +33617,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -33370,6 +33643,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -34996,7 +35270,9 @@ urls?: ((URL | Link))[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -35004,7 +35280,7 @@ urls?: ((URL | Link))[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -35016,8 +35292,12 @@ urls?: ((URL | Link))[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -35026,7 +35306,7 @@ urls?: ((URL | Link))[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -35070,7 +35350,7 @@ urls?: ((URL | Link))[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -35096,6 +35376,7 @@ urls?: ((URL | Link))[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -36646,7 +36927,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -36654,7 +36937,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -36666,8 +36949,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -36676,7 +36963,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -36720,7 +37007,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -36746,6 +37033,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -36999,7 +37287,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -37007,7 +37297,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -37019,8 +37309,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -37029,7 +37323,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -37073,7 +37367,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -37099,6 +37393,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -38787,7 +39082,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -38795,7 +39092,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -38807,8 +39104,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -38817,7 +39118,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -38861,7 +39162,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -38887,6 +39188,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39142,7 +39444,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39150,7 +39454,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -39162,8 +39466,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39172,7 +39480,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39216,7 +39524,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -39242,6 +39550,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39497,7 +39806,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39505,7 +39816,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -39517,8 +39828,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39527,7 +39842,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39571,7 +39886,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -39597,6 +39912,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -39852,7 +40168,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -39860,7 +40178,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -39872,8 +40190,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -39882,7 +40204,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -39926,7 +40248,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -39952,6 +40274,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40221,7 +40544,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40229,7 +40554,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -40241,8 +40566,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40251,7 +40580,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -40295,7 +40624,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -40321,6 +40650,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40575,7 +40905,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40583,7 +40915,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -40595,8 +40927,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40605,7 +40941,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -40649,7 +40985,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -40675,6 +41011,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -40929,7 +41266,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -40937,7 +41276,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -40949,8 +41288,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -40959,7 +41302,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41003,7 +41346,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -41029,6 +41372,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41283,7 +41627,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41291,7 +41637,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -41303,8 +41649,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -41313,7 +41663,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41357,7 +41707,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -41383,6 +41733,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41637,7 +41988,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41645,7 +41998,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -41657,8 +42010,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -41667,7 +42024,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -41711,7 +42068,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -41737,6 +42094,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -41991,7 +42349,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -41999,7 +42359,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -42011,8 +42371,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42021,7 +42385,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42065,7 +42429,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -42091,6 +42455,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -42345,7 +42710,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -42353,7 +42720,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -42365,8 +42732,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42375,7 +42746,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42419,7 +42790,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -42445,6 +42816,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -42699,7 +43071,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -42707,7 +43081,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -42719,8 +43093,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -42729,7 +43107,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -42773,7 +43151,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -42799,6 +43177,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -44838,7 +45217,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -44846,7 +45227,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -44858,8 +45239,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -44868,7 +45253,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -44912,7 +45297,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -44938,6 +45323,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -46472,7 +46858,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -46480,7 +46868,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -46492,8 +46880,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -46502,7 +46894,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -46546,7 +46938,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -46572,6 +46964,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -46825,7 +47218,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -46833,7 +47228,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -46845,8 +47240,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -46855,7 +47254,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -46899,7 +47298,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -46925,6 +47324,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -48972,7 +49372,9 @@ cryptosuite?: "eddsa-jcs-2022" | null;verificationMethod?: Multikey | URL | null } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -48980,7 +49382,7 @@ cryptosuite?: "eddsa-jcs-2022" | null;verificationMethod?: Multikey | URL | null }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -48992,8 +49394,12 @@ cryptosuite?: "eddsa-jcs-2022" | null;verificationMethod?: Multikey | URL | null // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -49002,7 +49408,7 @@ cryptosuite?: "eddsa-jcs-2022" | null;verificationMethod?: Multikey | URL | null document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -49046,7 +49452,7 @@ cryptosuite?: "eddsa-jcs-2022" | null;verificationMethod?: Multikey | URL | null } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -49072,6 +49478,7 @@ cryptosuite?: "eddsa-jcs-2022" | null;verificationMethod?: Multikey | URL | null contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -50216,7 +50623,9 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -50224,7 +50633,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -50236,8 +50645,12 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -50246,7 +50659,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -50290,7 +50703,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -50316,6 +50729,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -51351,7 +51765,9 @@ controller?: Application | Group | Organization | Person | Service | URL | null; } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -51359,7 +51775,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -51371,8 +51787,12 @@ controller?: Application | Group | Organization | Person | Service | URL | null; // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -51381,7 +51801,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -51425,7 +51845,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -51451,6 +51871,7 @@ controller?: Application | Group | Organization | Person | Service | URL | null; contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -58098,7 +58519,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -58106,7 +58529,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -58118,8 +58541,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -58128,7 +58555,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -58172,7 +58599,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -58198,6 +58625,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -58580,7 +59008,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -58588,7 +59018,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -58600,8 +59030,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -58610,7 +59044,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -58654,7 +59088,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -58680,6 +59114,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59116,7 +59551,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59124,7 +59561,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -59136,8 +59573,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59146,7 +59587,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59190,7 +59631,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -59216,6 +59657,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59491,7 +59933,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59499,7 +59943,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -59511,8 +59955,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59521,7 +59969,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59565,7 +60013,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -59591,6 +60039,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -59863,7 +60312,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -59871,7 +60322,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -59883,8 +60334,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -59893,7 +60348,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -59937,7 +60392,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -59963,6 +60418,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60221,7 +60677,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60229,7 +60687,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -60241,8 +60699,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60251,7 +60713,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -60295,7 +60757,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -60321,6 +60783,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60582,7 +61045,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60590,7 +61055,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -60602,8 +61067,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60612,7 +61081,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -60656,7 +61125,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -60682,6 +61151,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -60941,7 +61411,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -60949,7 +61421,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -60961,8 +61433,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -60971,7 +61447,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61015,7 +61491,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -61041,6 +61517,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -61298,7 +61775,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -61306,7 +61785,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -61318,8 +61797,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -61328,7 +61811,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61372,7 +61855,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -61398,6 +61881,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -61655,7 +62139,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -61663,7 +62149,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -61675,8 +62161,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -61685,7 +62175,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -61729,7 +62219,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -61755,6 +62245,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62009,7 +62500,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62017,7 +62510,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -62029,8 +62522,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62039,7 +62536,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62083,7 +62580,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -62109,6 +62606,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62443,7 +62941,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62451,7 +62951,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -62463,8 +62963,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62473,7 +62977,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62517,7 +63021,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -62543,6 +63047,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -62832,7 +63337,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -62840,7 +63347,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -62852,8 +63359,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -62862,7 +63373,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -62906,7 +63417,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -62932,6 +63443,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -63358,7 +63870,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -63366,7 +63880,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -63378,8 +63892,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -63388,7 +63906,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -63432,7 +63950,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -63458,6 +63976,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -67616,7 +68135,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -67624,7 +68145,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -67636,8 +68157,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -67646,7 +68171,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -67690,7 +68215,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -67716,6 +68241,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -67995,7 +68521,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -68003,7 +68531,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -68015,8 +68543,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -68025,7 +68557,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -68069,7 +68601,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -68095,6 +68627,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71210,7 +71743,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71218,7 +71753,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -71230,8 +71765,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71240,7 +71779,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71284,7 +71823,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -71310,6 +71849,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71565,7 +72105,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71573,7 +72115,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -71585,8 +72127,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71595,7 +72141,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71639,7 +72185,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -71665,6 +72211,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -71918,7 +72465,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -71926,7 +72475,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -71938,8 +72487,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -71948,7 +72501,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -71992,7 +72545,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -72018,6 +72571,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -77831,7 +78385,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -77839,7 +78395,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -77851,8 +78407,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -77861,7 +78421,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -77905,7 +78465,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -77931,6 +78491,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -78313,7 +78874,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -78321,7 +78884,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -78333,8 +78896,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -78343,7 +78910,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -78387,7 +78954,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -78413,6 +78980,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -78849,7 +79417,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -78857,7 +79427,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -78869,8 +79439,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -78879,7 +79453,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -78923,7 +79497,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -78949,6 +79523,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79224,7 +79799,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79232,7 +79809,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -79244,8 +79821,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79254,7 +79835,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -79298,7 +79879,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -79324,6 +79905,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79596,7 +80178,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79604,7 +80188,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -79616,8 +80200,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79626,7 +80214,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -79670,7 +80258,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -79696,6 +80284,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -79954,7 +80543,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -79962,7 +80553,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -79974,8 +80565,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -79984,7 +80579,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80028,7 +80623,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -80054,6 +80649,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -80315,7 +80911,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -80323,7 +80921,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -80335,8 +80933,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -80345,7 +80947,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80389,7 +80991,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -80415,6 +81017,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -80674,7 +81277,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -80682,7 +81287,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -80694,8 +81299,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -80704,7 +81313,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -80748,7 +81357,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -80774,6 +81383,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81031,7 +81641,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81039,7 +81651,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -81051,8 +81663,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81061,7 +81677,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81105,7 +81721,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -81131,6 +81747,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81388,7 +82005,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81396,7 +82015,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -81408,8 +82027,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81418,7 +82041,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81462,7 +82085,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -81488,6 +82111,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -81742,7 +82366,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -81750,7 +82376,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -81762,8 +82388,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -81772,7 +82402,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -81816,7 +82446,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -81842,6 +82472,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -82176,7 +82807,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -82184,7 +82817,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -82196,8 +82829,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -82206,7 +82843,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -82250,7 +82887,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -82276,6 +82913,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -82565,7 +83203,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -82573,7 +83213,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -82585,8 +83225,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -82595,7 +83239,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -82639,7 +83283,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -82665,6 +83309,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -83091,7 +83736,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -83099,7 +83746,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -83111,8 +83758,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -83121,7 +83772,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -83165,7 +83816,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -83191,6 +83842,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -86995,7 +87647,9 @@ get names(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -87003,7 +87657,7 @@ get names(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -87015,8 +87669,12 @@ get names(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -87025,7 +87683,7 @@ get names(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -87069,7 +87727,7 @@ get names(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -87095,6 +87753,7 @@ get names(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -92694,7 +93353,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -92702,7 +93363,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -92714,8 +93375,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -92724,7 +93389,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -92768,7 +93433,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -92794,6 +93459,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -93073,7 +93739,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -93081,7 +93749,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -93093,8 +93761,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -93103,7 +93775,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -93147,7 +93819,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -93173,6 +93845,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -94221,7 +94894,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -94229,7 +94904,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -94241,8 +94916,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -94251,7 +94930,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -94295,7 +94974,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -94321,6 +95000,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -96252,7 +96932,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -96260,7 +96942,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -96272,8 +96954,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -96282,7 +96968,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -96326,7 +97012,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -96352,6 +97038,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -96734,7 +97421,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -96742,7 +97431,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -96754,8 +97443,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -96764,7 +97457,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -96808,7 +97501,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -96834,6 +97527,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -97270,7 +97964,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -97278,7 +97974,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -97290,8 +97986,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -97300,7 +98000,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -97344,7 +98044,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -97370,6 +98070,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -97645,7 +98346,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -97653,7 +98356,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -97665,8 +98368,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -97675,7 +98382,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -97719,7 +98426,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -97745,6 +98452,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98017,7 +98725,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98025,7 +98735,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -98037,8 +98747,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98047,7 +98761,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98091,7 +98805,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -98117,6 +98831,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98375,7 +99090,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98383,7 +99100,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -98395,8 +99112,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98405,7 +99126,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98449,7 +99170,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -98475,6 +99196,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -98736,7 +99458,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -98744,7 +99468,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -98756,8 +99480,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -98766,7 +99494,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -98810,7 +99538,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -98836,6 +99564,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99095,7 +99824,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99103,7 +99834,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -99115,8 +99846,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99125,7 +99860,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99169,7 +99904,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -99195,6 +99930,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99452,7 +100188,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99460,7 +100198,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -99472,8 +100210,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99482,7 +100224,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99526,7 +100268,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -99552,6 +100294,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -99809,7 +100552,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -99817,7 +100562,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -99829,8 +100574,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -99839,7 +100588,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -99883,7 +100632,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -99909,6 +100658,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100163,7 +100913,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100171,7 +100923,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -100183,8 +100935,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -100193,7 +100949,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -100237,7 +100993,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -100263,6 +101019,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100597,7 +101354,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100605,7 +101364,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -100617,8 +101376,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -100627,7 +101390,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -100671,7 +101434,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -100697,6 +101460,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -100986,7 +101750,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -100994,7 +101760,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -101006,8 +101772,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -101016,7 +101786,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -101060,7 +101830,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -101086,6 +101856,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -101512,7 +102283,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -101520,7 +102293,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -101532,8 +102305,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -101542,7 +102319,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -101586,7 +102363,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -101612,6 +102389,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -106305,7 +107083,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -106313,7 +107093,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -106325,8 +107105,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -106335,7 +107119,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -106379,7 +107163,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -106405,6 +107189,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -106787,7 +107572,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -106795,7 +107582,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -106807,8 +107594,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -106817,7 +107608,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -106861,7 +107652,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -106887,6 +107678,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -107323,7 +108115,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -107331,7 +108125,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -107343,8 +108137,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -107353,7 +108151,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -107397,7 +108195,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -107423,6 +108221,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -107698,7 +108497,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -107706,7 +108507,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -107718,8 +108519,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -107728,7 +108533,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -107772,7 +108577,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -107798,6 +108603,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108070,7 +108876,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108078,7 +108886,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -108090,8 +108898,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108100,7 +108912,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108144,7 +108956,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -108170,6 +108982,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108428,7 +109241,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108436,7 +109251,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -108448,8 +109263,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108458,7 +109277,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108502,7 +109321,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -108528,6 +109347,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -108789,7 +109609,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -108797,7 +109619,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -108809,8 +109631,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -108819,7 +109645,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -108863,7 +109689,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -108889,6 +109715,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109148,7 +109975,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109156,7 +109985,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -109168,8 +109997,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109178,7 +110011,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109222,7 +110055,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -109248,6 +110081,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109505,7 +110339,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109513,7 +110349,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -109525,8 +110361,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109535,7 +110375,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109579,7 +110419,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -109605,6 +110445,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -109862,7 +110703,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -109870,7 +110713,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -109882,8 +110725,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -109892,7 +110739,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -109936,7 +110783,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -109962,6 +110809,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -110216,7 +111064,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -110224,7 +111074,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -110236,8 +111086,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -110246,7 +111100,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -110290,7 +111144,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -110316,6 +111170,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -110650,7 +111505,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -110658,7 +111515,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -110670,8 +111527,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -110680,7 +111541,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -110724,7 +111585,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -110750,6 +111611,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -111039,7 +111901,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -111047,7 +111911,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -111059,8 +111923,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -111069,7 +111937,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -111113,7 +111981,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -111139,6 +112007,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -111565,7 +112434,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -111573,7 +112444,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -111585,8 +112456,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -111595,7 +112470,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -111639,7 +112514,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -111665,6 +112540,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -116139,7 +117015,9 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -116147,7 +117025,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -116159,8 +117037,12 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -116169,7 +117051,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -116213,7 +117095,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -116239,6 +117121,7 @@ proofs?: (DataIntegrityProof | URL)[];interactionPolicy?: InteractionPolicy | nu contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -117250,7 +118133,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -117258,7 +118143,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -117270,8 +118155,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -117280,7 +118169,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -117324,7 +118213,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -117350,6 +118239,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -117611,7 +118501,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -117619,7 +118511,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -117631,8 +118523,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -117641,7 +118537,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -117685,7 +118581,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -117711,6 +118607,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -118002,7 +118899,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -118010,7 +118909,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -118022,8 +118921,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -118032,7 +118935,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -118076,7 +118979,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -118102,6 +119005,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -118381,7 +119285,9 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -118389,7 +119295,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -118401,8 +119307,12 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -118411,7 +119321,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -118455,7 +119365,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -118481,6 +119391,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -120717,7 +121628,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -120725,7 +121638,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -120737,8 +121650,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -120747,7 +121664,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -120791,7 +121708,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -120817,6 +121734,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -121074,7 +121992,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -121082,7 +122002,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -121094,8 +122014,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -121104,7 +122028,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -121148,7 +122072,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -121174,6 +122098,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -121558,7 +122483,9 @@ relationships?: (Object | URL)[];} } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -121566,7 +122493,7 @@ relationships?: (Object | URL)[];} }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -121578,8 +122505,12 @@ relationships?: (Object | URL)[];} // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -121588,7 +122519,7 @@ relationships?: (Object | URL)[];} document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -121632,7 +122563,7 @@ relationships?: (Object | URL)[];} } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -121658,6 +122589,7 @@ relationships?: (Object | URL)[];} contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -124216,7 +125148,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -124224,7 +125158,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -124236,8 +125170,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -124246,7 +125184,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -124290,7 +125228,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -124316,6 +125254,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -124698,7 +125637,9 @@ get preferredUsernames(): ((string | LanguageString))[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -124706,7 +125647,7 @@ get preferredUsernames(): ((string | LanguageString))[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -124718,8 +125659,12 @@ get preferredUsernames(): ((string | LanguageString))[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -124728,7 +125673,7 @@ get preferredUsernames(): ((string | LanguageString))[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -124772,7 +125717,7 @@ get preferredUsernames(): ((string | LanguageString))[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -124798,6 +125743,7 @@ get preferredUsernames(): ((string | LanguageString))[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125234,7 +126180,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125242,7 +126190,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -125254,8 +126202,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -125264,7 +126216,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -125308,7 +126260,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -125334,6 +126286,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125609,7 +126562,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125617,7 +126572,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -125629,8 +126584,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -125639,7 +126598,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -125683,7 +126642,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -125709,6 +126668,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -125981,7 +126941,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -125989,7 +126951,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -126001,8 +126963,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126011,7 +126977,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126055,7 +127021,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -126081,6 +127047,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -126339,7 +127306,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -126347,7 +127316,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -126359,8 +127328,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126369,7 +127342,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126413,7 +127386,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -126439,6 +127412,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -126700,7 +127674,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -126708,7 +127684,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -126720,8 +127696,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -126730,7 +127710,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -126774,7 +127754,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -126800,6 +127780,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127059,7 +128040,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127067,7 +128050,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -127079,8 +128062,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127089,7 +128076,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127133,7 +128120,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -127159,6 +128146,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127416,7 +128404,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127424,7 +128414,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -127436,8 +128426,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127446,7 +128440,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127490,7 +128484,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -127516,6 +128510,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -127773,7 +128768,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -127781,7 +128778,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -127793,8 +128790,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -127803,7 +128804,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -127847,7 +128848,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -127873,6 +128874,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128127,7 +129129,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128135,7 +129139,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -128147,8 +129151,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128157,7 +129165,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -128201,7 +129209,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -128227,6 +129235,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128561,7 +129570,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128569,7 +129580,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -128581,8 +129592,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128591,7 +129606,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -128635,7 +129650,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -128661,6 +129676,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -128950,7 +129966,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -128958,7 +129976,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -128970,8 +129988,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -128980,7 +130002,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -129024,7 +130046,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -129050,6 +130072,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); @@ -129476,7 +130499,9 @@ get gateways(): (URL)[] { } let fetchResult: RemoteDocument; try { - fetchResult = await documentLoader(lookupUrl); + fetchResult = await documentLoader(lookupUrl, { + suppressError: options.suppressError, + }); } catch (error) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -129484,7 +130509,7 @@ get gateways(): (URL)[] { }); span.end(); if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to fetch {url}: {error}", { error, url: lookupUrl } ); @@ -129496,8 +130521,12 @@ get gateways(): (URL)[] { // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -129506,7 +130535,7 @@ get gateways(): (URL)[] { document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -129550,7 +130579,7 @@ get gateways(): (URL)[] { } } catch (e) { if (options.suppressError) { - getLogger(["fedify", "vocab"]).error( + getLogger(["fedify", "vocab"]).warn( "Failed to parse {url}: {error}", { error: e, url: lookupUrl } ); @@ -129576,6 +130605,7 @@ get gateways(): (URL)[] { contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); diff --git a/packages/vocab-tools/src/class.ts b/packages/vocab-tools/src/class.ts index 2c6e5dea9..72d7674f4 100644 --- a/packages/vocab-tools/src/class.ts +++ b/packages/vocab-tools/src/class.ts @@ -14,6 +14,7 @@ const XSD_ANY_URI = "http://www.w3.org/2001/XMLSchema#anyURI"; const FEDIFY_URL = "fedify:url"; const INTERNAL_RUNTIME_IMPORTS = [ "compactJsonLdCache", + "createScopedContextLoader", "getJsonLdContext", "isTrustedIriOrigin", "normalizeJsonLdIris", diff --git a/packages/vocab-tools/src/property.ts b/packages/vocab-tools/src/property.ts index f253a043f..13088daea 100644 --- a/packages/vocab-tools/src/property.ts +++ b/packages/vocab-tools/src/property.ts @@ -181,8 +181,12 @@ async function* generateProperty( // In portable mode, the document may turn out to be a portable object, // which has to be verified with the same context documents: const snapshot = portableMode - ? createSnapshotContextLoader(contextLoader) + ? createSnapshotContextLoader(contextLoader, options.suppressError) : null; + const scopedContext = createScopedContextLoader( + snapshot?.loader ?? contextLoader, + snapshot == null && options.suppressError, + ); try { let claim: PortableResponseClaim | null | undefined; try { @@ -191,7 +195,7 @@ async function* generateProperty( document, { documentLoader, - contextLoader: snapshot?.loader ?? contextLoader, + contextLoader: scopedContext.loader, tracerProvider, baseUrl, } @@ -261,6 +265,7 @@ async function* generateProperty( contextLoader: snapshot?.loader, }); } finally { + scopedContext.release(); snapshot?.release(); } }); diff --git a/packages/vocab/src/vocab.test.ts b/packages/vocab/src/vocab.test.ts index 30d987fa6..b18e4ba23 100644 --- a/packages/vocab/src/vocab.test.ts +++ b/packages/vocab/src/vocab.test.ts @@ -5685,3 +5685,197 @@ for (const typeUri in types) { deepStrictEqual(cls.typeId, new URL(type.uri)); }); } + +test("Announce.getObject() suppresses redirect, context, and private URL logs", async () => { + const records: LogRecord[] = []; + const objectUrl = "https://example.com/suppression-object"; + const contextUrl = "https://example.com/suppression-context"; + const scenarios = [ + "redirect limit", + "redirect loop", + "context", + "private", + "private redirect", + ]; + await reset(); + await configure({ + sinks: { + capture: (record) => { + records.push(record); + }, + }, + loggers: [{ + category: ["fedify"], + lowestLevel: "debug", + sinks: ["capture"], + }], + }); + try { + for (const scenario of scenarios) { + fetchMock.spyGlobal(); + let fetches = 0; + fetchMock.get("begin:https://example.com/", (call) => { + fetches++; + if (scenario === "redirect limit") { + return Response.redirect( + `https://example.com/redirect-${fetches}`, + 302, + ); + } + if (scenario === "redirect loop") { + return Response.redirect(objectUrl, 302); + } + if (scenario === "private redirect") { + return Response.redirect("http://127.0.0.1/private", 302); + } + if (call.url === contextUrl) return new Response(null, { status: 404 }); + return new Response( + JSON.stringify({ + "@context": ["https://www.w3.org/ns/activitystreams", contextUrl], + id: objectUrl, + type: "Note", + }), + { headers: { "Content-Type": "application/activity+json" } }, + ); + }); + try { + for (const suppressError of [true, false, undefined]) { + records.length = 0; + fetches = 0; + const announce = new Announce({ + object: new URL( + scenario === "private" ? "http://127.0.0.1/private" : objectUrl, + ), + }); + if (suppressError) { + deepStrictEqual(await announce.getObject({ suppressError }), null); + deepStrictEqual( + records.filter((r) => r.level === "error"), + [], + scenario, + ); + ok(records.some((r) => r.level === "warning"), scenario); + } else { + await rejects(() => announce.getObject({ suppressError })); + ok(records.some((r) => r.level === "error"), scenario); + } + if (scenario === "private") deepStrictEqual(fetches, 0); + if (scenario === "private redirect") deepStrictEqual(fetches, 1); + } + } finally { + fetchMock.hardReset(); + } + } + } finally { + await reset(); + } +}); + +test("suppressed context loading does not persist on fetched objects", async () => { + const states: (boolean | undefined)[] = []; + const contextLoader: DocumentLoader = (url, options) => { + if (url === "https://www.w3.org/ns/activitystreams") { + return mockDocumentLoader(url); + } + states.push(options?.suppressError); + return Promise.resolve({ + contextUrl: null, + documentUrl: url, + document: { + "@context": { + as: "https://www.w3.org/ns/activitystreams#", + name: "as:name", + }, + }, + }); + }; + const documentLoader: DocumentLoader = (url) => + Promise.resolve({ + contextUrl: null, + documentUrl: url, + document: { + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://example.com/scoped-context", + ], + id: url, + type: url.endsWith("actor") ? "Person" : "Note", + attributedTo: "https://example.com/scoped-actor", + }, + }); + const note = await new Announce({ + object: new URL("https://example.com/scoped-note"), + }).getObject({ + documentLoader, + contextLoader, + suppressError: true, + }); + assertInstanceOf(note, Note); + ok(states.includes(true)); + states.length = 0; + const actor = await note.getAttribution(); + assertInstanceOf(actor, Person); + ok(states.length > 0); + deepStrictEqual(states.includes(true), false); +}); + +test("portable accessors suppress document and context failure logs", async () => { + const records: LogRecord[] = []; + const id = new URL("ap+ef61://did%3Akey%3Az6Mkabc/objects/1"); + const contextUrl = "https://example.com/portable-suppression-context"; + await reset(); + await configure({ + sinks: { + capture: (record) => { + records.push(record); + }, + }, + loggers: [{ + category: ["fedify"], + lowestLevel: "debug", + sinks: ["capture"], + }], + }); + try { + for (const failContext of [false, true]) { + fetchMock.spyGlobal(); + fetchMock.get("begin:https://example.com/", (call) => { + if (!failContext || call.url === contextUrl) { + return new Response(null, { status: 404 }); + } + return new Response( + JSON.stringify({ + "@context": ["https://www.w3.org/ns/activitystreams", contextUrl], + id: "ap://did:key:z6Mkabc/objects/1", + type: "Note", + }), + { headers: { "Content-Type": "application/activity+json" } }, + ); + }); + try { + for (const suppressError of [true, false, undefined]) { + records.length = 0; + const announce = new Announce({ object: id }); + const options = { + suppressError, + gateways: ["https://example.com/"], + verifyPortableObject: () => + Promise.resolve({ verified: true as const }), + }; + if (suppressError) { + deepStrictEqual(await announce.getObject(options), null); + deepStrictEqual(records.filter((r) => r.level === "error"), []); + ok(records.some((r) => r.level === "warning")); + } else { + await rejects(() => announce.getObject(options)); + ok(records.some((r) => r.level === "error")); + } + } + } finally { + fetchMock.hardReset(); + } + } + } finally { + await reset(); + } +}); From 49f2c0259ab88b268142cdac18546a6d53d6cad3 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 29 Sep 2026 17:50:07 +0900 Subject: [PATCH 4/6] Scope suppressed proof document loading Pass a scoped document loader to portable proof verifiers so extra fetch failures honor the accessor's suppressError setting. Release the wrapper after dereferencing so retained loaders resume normal logging. Cover verifier success and failure, default suppression behavior, signal forwarding, and loader reuse in a regression test. https://github.com/fedify-dev/fedify/issues/933 https://github.com/fedify-dev/fedify/pull/1035 Assisted-by: Codex:gpt-6-sol --- .../src/internal/portable-dereference.ts | 8 +- packages/vocab/src/vocab.test.ts | 94 +++++++++++++++++++ 2 files changed, 101 insertions(+), 1 deletion(-) diff --git a/packages/vocab-runtime/src/internal/portable-dereference.ts b/packages/vocab-runtime/src/internal/portable-dereference.ts index 4ce29f448..61a7c506e 100644 --- a/packages/vocab-runtime/src/internal/portable-dereference.ts +++ b/packages/vocab-runtime/src/internal/portable-dereference.ts @@ -7,6 +7,7 @@ import { import preloadedContexts from "../contexts.ts"; import type { DocumentLoader, RemoteDocument } from "../docloader.ts"; import jsonld from "../jsonld.ts"; +import { createScopedContextLoader } from "./jsonld-cache.ts"; import type { PortableObjectReferrer, PortableObjectVerification, @@ -776,6 +777,10 @@ export async function dereferencePortableIri( options.suppressError, ); const contextLoader = snapshot.loader; + const scopedDocument = createScopedContextLoader( + options.documentLoader, + options.suppressError, + ); const attempts: Attempt[] = []; const { signal } = options; const gatewayHints = explicitGateways == null && inferredGateways.length > 0 @@ -813,7 +818,7 @@ export async function dereferencePortableIri( let result: PortableObjectVerification; try { result = await verify(document, { - documentLoader: options.documentLoader, + documentLoader: scopedDocument.loader, contextLoader, tracerProvider: options.tracerProvider, ...(documentUrl == null ? {} : { documentUrl }), @@ -871,6 +876,7 @@ export async function dereferencePortableIri( } } } finally { + scopedDocument.release(); snapshot.release(); } const rejected = attempts.filter((a) => a.type === "rejected"); diff --git a/packages/vocab/src/vocab.test.ts b/packages/vocab/src/vocab.test.ts index b18e4ba23..bd35383df 100644 --- a/packages/vocab/src/vocab.test.ts +++ b/packages/vocab/src/vocab.test.ts @@ -3,6 +3,7 @@ import { decodeMultibase, type DocumentLoader, FetchError, + getDocumentLoader, LanguageString, parseDecimal, type RemoteDocument, @@ -5879,3 +5880,96 @@ test("portable accessors suppress document and context failure logs", async () = await reset(); } }); + +test("portable verifiers suppress document logs only during dereferencing", async () => { + const records: LogRecord[] = []; + const id = new URL("ap+ef61://did%3Akey%3Az6Mkabc/objects/1"); + const verificationUrl = "https://example.com/verification-document"; + const missingUrl = "https://example.com/missing-verification-document"; + const signal = new AbortController().signal; + await reset(); + await configure({ + sinks: { capture: (record) => records.push(record) }, + loggers: [{ + category: ["fedify"], + lowestLevel: "debug", + sinks: ["capture"], + }], + }); + try { + for (const failVerification of [false, true]) { + fetchMock.spyGlobal(); + fetchMock.get("begin:https://example.com/.well-known/", { + headers: { "Content-Type": "application/activity+json" }, + body: { + "@context": "https://www.w3.org/ns/activitystreams", + id: "ap://did:key:z6Mkabc/objects/1", + type: "Note", + }, + }); + fetchMock.get(verificationUrl, { + status: failVerification ? 404 : 200, + headers: { "Content-Type": "application/ld+json" }, + body: {}, + }); + fetchMock.get(missingUrl, { status: 404 }); + try { + for (const suppressError of [true, false, undefined]) { + records.length = 0; + const baseLoader = getDocumentLoader(); + const calls: Parameters[1][] = []; + const documentLoader: DocumentLoader = (url, options) => { + calls.push(options); + return baseLoader(url, options); + }; + let retainedLoader: DocumentLoader | undefined; + const loaderOptions = { signal }; + const announce = new Announce({ object: id }); + const object = await announce.getObject({ + suppressError, + documentLoader, + gateways: ["https://example.com/"], + verifyPortableObject: async (_document, options) => { + retainedLoader = options.documentLoader; + ok(options.documentLoader); + await options.documentLoader(verificationUrl, loaderOptions); + return { verified: true }; + }, + }); + if (failVerification) { + deepStrictEqual(object, null); + deepStrictEqual( + records.some((record) => record.level === "error"), + !suppressError, + ); + ok(records.some((record) => record.level === "warning")); + } else { + assertInstanceOf(object, Note); + } + deepStrictEqual(calls.at(-1)?.signal, signal); + deepStrictEqual( + calls.at(-1)?.suppressError, + suppressError ? true : undefined, + ); + deepStrictEqual(loaderOptions, { signal }); + + // A verifier may retain the loader after success or rejection. + // Suppression must end when the accessor returns in either case. + records.length = 0; + const releasedLoader = retainedLoader; + ok(releasedLoader); + await rejects( + () => releasedLoader(missingUrl, loaderOptions), + FetchError, + ); + deepStrictEqual(calls.at(-1), loaderOptions); + ok(records.some((record) => record.level === "error")); + } + } finally { + fetchMock.hardReset(); + } + } + } finally { + await reset(); + } +}); From 88f022e93b7c083b25b483c057843e0077656a98 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 29 Sep 2026 18:41:08 +0900 Subject: [PATCH 5/6] Unwrap mixed released context loaders Share wrapper registration and unwrapping between scoped suppression loaders and portable context snapshots. Alternating ordinary and portable accessors otherwise retain released loader chains, causing progressive slowdown and eventual stack overflow. Keep active wrappers intact so in-flight suppression and snapshot caches continue to apply. Add regression coverage for mixed chains, active wrapper behavior, and bounded attribution lookup call depth. https://github.com/fedify-dev/fedify/issues/933 https://github.com/fedify-dev/fedify/pull/1035 Assisted-by: Codex:gpt-6-sol Assisted-by: Claude Code:claude-opus-5-5 --- .../src/internal/jsonld-cache.ts | 45 ++++++++--- .../src/internal/portable-dereference.test.ts | 71 ++++++++++++++++ .../src/internal/portable-dereference.ts | 21 ++--- packages/vocab/src/vocab.test.ts | 80 +++++++++++++++++++ 4 files changed, 193 insertions(+), 24 deletions(-) diff --git a/packages/vocab-runtime/src/internal/jsonld-cache.ts b/packages/vocab-runtime/src/internal/jsonld-cache.ts index 63397be8c..8289666df 100644 --- a/packages/vocab-runtime/src/internal/jsonld-cache.ts +++ b/packages/vocab-runtime/src/internal/jsonld-cache.ts @@ -4,11 +4,42 @@ import { formatIri, haveSameFe34Origin, haveSameIriOrigin } from "../url.ts"; const noJsonLdContext = Symbol("noJsonLdContext"); -const scopedLoaders = new WeakMap< +const documentLoaderWrappers = new WeakMap< DocumentLoader, - { base: DocumentLoader; released: boolean } + { readonly base: DocumentLoader; released: boolean } >(); +/** + * Registers a loader wrapper with the shared released-wrapper registry. + * Both suppression and snapshot wrappers must use this registry so mixed + * chains can be unwrapped. The caller updates the state on release. + * @internal Not a public API. + */ +export function registerDocumentLoaderWrapper( + loader: DocumentLoader, + state: { readonly base: DocumentLoader; released: boolean }, +): void { + documentLoaderWrappers.set(loader, state); +} + +/** + * Removes released loader wrappers, stopping at the first active wrapper. + * Active wrappers retain their operation's suppression or snapshot cache. + * @internal Not a public API. + */ +export function unwrapReleasedDocumentLoader( + base: DocumentLoader, +): DocumentLoader { + for ( + let state = documentLoaderWrappers.get(base); + state?.released; + state = documentLoaderWrappers.get(base) + ) { + base = state.base; + } + return base; +} + /** * Lowers context loading failure logs for one accessor operation. Parsed * objects retain the loader, so release it before returning to the caller. @@ -19,18 +50,12 @@ export function createScopedContextLoader( base: DocumentLoader, suppressError?: boolean, ): { loader: DocumentLoader; release: () => void } { - for ( - let state = scopedLoaders.get(base); - state?.released; - state = scopedLoaders.get(base) - ) { - base = state.base; - } + base = unwrapReleasedDocumentLoader(base); if (!suppressError) return { loader: base, release: () => {} }; const state = { base, released: false }; const loader: DocumentLoader = (url, options) => base(url, state.released ? options : { ...options, suppressError: true }); - scopedLoaders.set(loader, state); + registerDocumentLoaderWrapper(loader, state); return { loader, release: () => { diff --git a/packages/vocab-runtime/src/internal/portable-dereference.test.ts b/packages/vocab-runtime/src/internal/portable-dereference.test.ts index 19779f040..3ed92187e 100644 --- a/packages/vocab-runtime/src/internal/portable-dereference.test.ts +++ b/packages/vocab-runtime/src/internal/portable-dereference.test.ts @@ -2,6 +2,7 @@ import { deepStrictEqual, ok, throws } from "node:assert/strict"; import { test } from "node:test"; import type { DocumentLoader } from "../docloader.ts"; import { parseIri } from "../url.ts"; +import { createScopedContextLoader } from "./jsonld-cache.ts"; import { createSnapshotContextLoader, getPortableGatewayCandidates, @@ -104,3 +105,73 @@ test("createSnapshotContextLoader() does not nest released snapshots", async () inner.release(); outer.release(); }); + +test("context loaders unwrap mixed released wrappers", async () => { + const calls: string[] = []; + const base: DocumentLoader = (url) => { + calls.push(url); + return Promise.resolve({ + contextUrl: null, + documentUrl: url, + document: { "@context": {} }, + }); + }; + for (const snapshotFirst of [false, true]) { + let loader = base; + for (let i = 0; i < 10000; i++) { + const wrapper = (i % 2 === 0) === snapshotFirst + ? createSnapshotContextLoader(loader, true) + : createScopedContextLoader(loader, true); + wrapper.release(); + loader = wrapper.loader; + } + const unwrapped = createScopedContextLoader(loader, false).loader; + deepStrictEqual(unwrapped, base); + await unwrapped("https://example.com/context"); + } + deepStrictEqual(calls, [ + "https://example.com/context", + "https://example.com/context", + ]); +}); + +test("mixed context wrappers preserve active suppression and snapshots", async () => { + for (const activeSnapshot of [false, true]) { + const calls: Parameters[1][] = []; + const base: DocumentLoader = (url, options) => { + calls.push(options); + return Promise.resolve({ + contextUrl: null, + documentUrl: url, + document: { "@context": {} }, + }); + }; + const active = activeSnapshot + ? createSnapshotContextLoader(base, true) + : createScopedContextLoader(base, true); + let loader = active.loader; + for (let i = 0; i < 4; i++) { + const wrapper = i % 2 === 0 + ? createScopedContextLoader(loader, true) + : createSnapshotContextLoader(loader, true); + wrapper.release(); + loader = wrapper.loader; + } + const unwrapped = createScopedContextLoader(loader, false).loader; + deepStrictEqual(unwrapped, active.loader); + const options = { signal: new AbortController().signal }; + const first = await unwrapped("https://example.com/context", options); + ok(first.document != null && typeof first.document === "object"); + Reflect.set(first.document, "changed", true); + const second = await unwrapped("https://example.com/context", options); + deepStrictEqual(second.document, { "@context": {} }); + deepStrictEqual(calls.length, activeSnapshot ? 1 : 2); + for (const call of calls) { + deepStrictEqual(call, { ...options, suppressError: true }); + } + active.release(); + deepStrictEqual(createScopedContextLoader(loader, false).loader, base); + await unwrapped("https://example.com/context", options); + deepStrictEqual(calls.at(-1), options); + } +}); diff --git a/packages/vocab-runtime/src/internal/portable-dereference.ts b/packages/vocab-runtime/src/internal/portable-dereference.ts index 61a7c506e..91d09355c 100644 --- a/packages/vocab-runtime/src/internal/portable-dereference.ts +++ b/packages/vocab-runtime/src/internal/portable-dereference.ts @@ -7,7 +7,11 @@ import { import preloadedContexts from "../contexts.ts"; import type { DocumentLoader, RemoteDocument } from "../docloader.ts"; import jsonld from "../jsonld.ts"; -import { createScopedContextLoader } from "./jsonld-cache.ts"; +import { + createScopedContextLoader, + registerDocumentLoaderWrapper, + unwrapReleasedDocumentLoader, +} from "./jsonld-cache.ts"; import type { PortableObjectReferrer, PortableObjectVerification, @@ -568,13 +572,7 @@ export function createSnapshotContextLoader( // Objects parsed during a dereference keep its loader, so later // dereferences from them would otherwise wrap released pass-throughs in // ever deeper chains: - for ( - let wrapped = snapshotLoaders.get(contextLoader); - wrapped?.released; - wrapped = snapshotLoaders.get(contextLoader) - ) { - contextLoader = wrapped.base; - } + contextLoader = unwrapReleasedDocumentLoader(contextLoader); const cache = new Map>(); let released = false; const release = () => { @@ -607,15 +605,10 @@ export function createSnapshotContextLoader( return structuredClone(await promise); }; const state = { base: contextLoader, released: false }; - snapshotLoaders.set(loader, state); + registerDocumentLoaderWrapper(loader, state); return { loader, release }; } -const snapshotLoaders = new WeakMap< - DocumentLoader, - { readonly base: DocumentLoader; released: boolean } ->(); - /** * Options for {@link dereferencePortableIri}. * diff --git a/packages/vocab/src/vocab.test.ts b/packages/vocab/src/vocab.test.ts index bd35383df..687987c34 100644 --- a/packages/vocab/src/vocab.test.ts +++ b/packages/vocab/src/vocab.test.ts @@ -5820,6 +5820,86 @@ test("suppressed context loading does not persist on fetched objects", async () deepStrictEqual(states.includes(true), false); }); +test("attribution chains alternate ordinary and portable suppression", async () => { + const states: (boolean | undefined)[] = []; + const depths: number[][] = []; + let hop = 0; + const contextUrl = "https://example.com/attribution-context"; + const contextLoader: DocumentLoader = (url, options) => { + if (url !== contextUrl) return mockDocumentLoader(url, options); + states.push(options?.suppressError); + const stack = new Error().stack; + ok(stack); + depths[hop]?.push(stack.split("\n").length); + return Promise.resolve({ + contextUrl: null, + documentUrl: url, + document: { + "@context": { name: "https://www.w3.org/ns/activitystreams#name" }, + }, + }); + }; + const documentLoader: DocumentLoader = (url) => { + const hop = Number(new URL(url).pathname.split("/").at(-1)); + return Promise.resolve({ + contextUrl: null, + documentUrl: url, + document: { + "@context": ["https://www.w3.org/ns/activitystreams", contextUrl], + id: url, + type: "Person", + name: `Actor ${hop}`, + attributedTo: `https://example.com/actors/${hop + 1}`, + }, + }); + }; + let person = new Person({ + id: new URL("https://example.com/actors/root"), + attribution: new URL("https://example.com/actors/0"), + }, { documentLoader, contextLoader }); + const stackTraceLimit = globalThis.Object.getOwnPropertyDescriptor( + Error, + "stackTraceLimit", + ); + try { + ok(Reflect.set(Error, "stackTraceLimit", Infinity)); + for (; hop < 100; hop++) { + depths[hop] = []; + const next = await person.getAttribution({ + suppressError: true, + ...(hop % 2 === 0 ? {} : { + verifyPortableObject: () => + Promise.resolve({ verified: true as const }), + }), + }); + assertInstanceOf(next, Person); + deepStrictEqual(next.id, new URL(`https://example.com/actors/${hop}`)); + person = next; + } + // Compare the same mode after warmup; a retained wrapper per hop would + // increase the synchronous call depth even before the stack overflows. + ok(depths.every((values) => values.length > 0)); + deepStrictEqual(depths[98], depths[2]); + deepStrictEqual(depths[99], depths[3]); + ok(states.length >= 100); + ok(states.every((state) => state === true)); + states.length = 0; + assertInstanceOf(await person.getAttribution(), Person); + ok(states.length > 0); + ok(states.every((state) => state !== true)); + } finally { + if (stackTraceLimit == null) { + Reflect.deleteProperty(Error, "stackTraceLimit"); + } else { + globalThis.Object.defineProperty( + Error, + "stackTraceLimit", + stackTraceLimit, + ); + } + } +}); + test("portable accessors suppress document and context failure logs", async () => { const records: LogRecord[] = []; const id = new URL("ap+ef61://did%3Akey%3Az6Mkabc/objects/1"); From 64e9cf775d27e1883ba59fd4bdbd0002afd9efd5 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Tue, 29 Sep 2026 19:04:28 +0900 Subject: [PATCH 6/6] Cover suppressed alternate and signed fetches Exercise option forwarding through Link-header and HTML alternates, including abort signals and warning-only HTTP failures. Cover suppressed and normal authenticated 404 responses while preserving FetchError. Verify that dropping forwarding at each of the three call sites makes these regression tests fail. https://github.com/fedify-dev/fedify/issues/933 https://github.com/fedify-dev/fedify/pull/1035 Changelog: none Assisted-by: Codex:gpt-6-sol Assisted-by: Codex:gpt-6-astra --- packages/fedify/src/utils/docloader.test.ts | 42 +++++++++++ packages/vocab-runtime/src/docloader.test.ts | 73 ++++++++++++++++++++ 2 files changed, 115 insertions(+) diff --git a/packages/fedify/src/utils/docloader.test.ts b/packages/fedify/src/utils/docloader.test.ts index 77a19e1f2..bf1baca09 100644 --- a/packages/fedify/src/utils/docloader.test.ts +++ b/packages/fedify/src/utils/docloader.test.ts @@ -252,6 +252,48 @@ test("getAuthenticatedDocumentLoader() bounds JSON after redirects", async () => } }); +test("authenticated document loader suppresses HTTP failure logs", async () => { + const records: LogRecord[] = []; + const url = "https://example.com/missing-authenticated-document"; + const loader = getAuthenticatedDocumentLoader({ + keyId: new URL("https://example.com/key2"), + privateKey: rsaPrivateKey2, + }, { allowPrivateAddress: true }); + await reset(); + await configure({ + sinks: { capture: (record) => records.push(record) }, + loggers: [{ + category: ["fedify"], + lowestLevel: "debug", + sinks: ["capture"], + }], + }); + fetchMock.mockGlobal(); + fetchMock.get(url, { status: 404 }); + try { + for (const suppressError of [true, false, undefined]) { + records.length = 0; + const error = await assertRejects( + () => loader(url, { suppressError }), + FetchError, + ); + assertEquals(error.response?.status, 404); + const failures = records.filter((record) => + record.rawMessage === + "Failed to fetch document: {status} {url} {headers}" + ); + assertEquals(failures.length, 1); + assertEquals(failures[0].level, suppressError ? "warning" : "error"); + if (suppressError) { + assertEquals(records.filter((record) => record.level === "error"), []); + } + } + } finally { + fetchMock.hardReset(); + await reset(); + } +}); + test("authenticated document loader suppresses private URL logs", async () => { const records: LogRecord[] = []; const loader = getAuthenticatedDocumentLoader({ diff --git a/packages/vocab-runtime/src/docloader.test.ts b/packages/vocab-runtime/src/docloader.test.ts index aeac706d3..b6c3fbb16 100644 --- a/packages/vocab-runtime/src/docloader.test.ts +++ b/packages/vocab-runtime/src/docloader.test.ts @@ -1,4 +1,5 @@ import fetchMock from "fetch-mock"; +import { configure, type LogRecord, reset } from "@logtape/logtape"; import { deepStrictEqual, ok, rejects } from "node:assert"; import { test } from "node:test"; import { createServer } from "node:http"; @@ -9,6 +10,78 @@ import { getDocumentLoader, getRemoteDocument } from "./docloader.ts"; import { FetchError } from "./request.ts"; import { UrlError } from "./url.ts"; +test("getRemoteDocument() forwards options to alternate documents", async () => { + const records: LogRecord[] = []; + await reset(); + await configure({ + sinks: { capture: (record) => records.push(record) }, + loggers: [{ + category: ["fedify"], + lowestLevel: "debug", + sinks: ["capture"], + }], + }); + try { + for (const linkHeader of [true, false]) { + for (const suppressError of [true, false, undefined]) { + records.length = 0; + const url = "https://example.com/alternate-source"; + const alternateUrl = "https://example.com/missing-alternate"; + const options = { + suppressError, + signal: new AbortController().signal, + }; + const response = new Response( + ``, + { + headers: { + "Content-Type": "text/html", + ...(linkHeader + ? { + Link: + `<${alternateUrl}>; rel="alternate"; type="application/activity+json"`, + } + : {}), + }, + }, + ); + let alternateRequests = 0; + await rejects( + () => + getRemoteDocument( + url, + response, + async (requestedUrl, forwarded) => { + alternateRequests++; + deepStrictEqual(requestedUrl, alternateUrl); + deepStrictEqual(forwarded, options); + return await getRemoteDocument( + requestedUrl, + new Response(null, { status: 404 }), + () => { + throw new Error("Unexpected additional alternate"); + }, + forwarded, + ); + }, + options, + ), + FetchError, + ); + deepStrictEqual(alternateRequests, 1); + const failures = records.filter((record) => + record.rawMessage === + "Failed to fetch document: {status} {url} {headers}" + ); + deepStrictEqual(failures.length, 1); + deepStrictEqual(failures[0].level, suppressError ? "warning" : "error"); + } + } + } finally { + await reset(); + } +}); + test("new FetchError()", () => { const e = new FetchError("https://example.com/", "An error message."); deepStrictEqual(e.name, "FetchError");