Skip to content

Commit 956c6d7

Browse files
committed
fix well-known route for unavailable domains
1 parent aef3f74 commit 956c6d7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • apps/web/app/wellknown/[domain]/[file]

apps/web/app/wellknown/[domain]/[file]/route.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ export async function GET(
1919
}
2020

2121
const { appleAppSiteAssociation, assetLinks } =
22-
await prismaEdge.domain.findUniqueOrThrow({
22+
(await prismaEdge.domain.findUnique({
2323
where: {
2424
slug: domain,
2525
},
2626
select: {
2727
appleAppSiteAssociation: true,
2828
assetLinks: true,
2929
},
30-
});
30+
})) || {
31+
appleAppSiteAssociation: null,
32+
assetLinks: null,
33+
};
3134

3235
let response: WellKnownConfig[SupportedWellKnownFiles];
3336
switch (file) {

0 commit comments

Comments
 (0)