From c35b4a3dc5364ee38f992175e3d1a3091ac2f907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Thu, 13 Feb 2025 09:54:32 -0600 Subject: [PATCH] Fix flaky tests It's normal that some of the "alias" queries return a 404 if a DID can't be looked up, in this case the endpoint returns a 404 and we just log it. --- src/lib/invoke.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/invoke.ts b/src/lib/invoke.ts index db153929b..e26c20821 100644 --- a/src/lib/invoke.ts +++ b/src/lib/invoke.ts @@ -13,6 +13,10 @@ export async function invoke( headers: { "Content-Type": "application/json" }, body: JSON.stringify(args), }).then(async response => { + if (response.status === 404) { + console.log("Got a 404 response:", response); + return null; + } const json = await response.json(); if (!response.ok) { throw json;