do not fail on incorrect MXC URLs

This commit is contained in:
Aine 2025-06-10 16:32:31 +03:00
parent 680fa3c0ee
commit 2d9ff83bbd
No known key found for this signature in database
GPG Key ID: 34969C908CCA2804

View File

@ -18,7 +18,7 @@ export const fetchAuthenticatedMedia = async (mxcUrl: string, type: MediaType):
const { serverName, mediaId } = getServerAndMediaIdFromMxcUrl(mxcUrl);
if (!serverName || !mediaId) {
console.error("Invalid mxcUrl", mxcUrl, "serverName:", serverName, "mediaId:", mediaId);
throw new Error("Invalid mxcUrl");
return new Response(null, { status: 400, statusText: "Invalid mxcUrl" });
}
let url = "";