fix: reduce share errors

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-05 19:03:59 +01:00
parent 0663ce6ac8
commit f67ec2bb6a
2 changed files with 14 additions and 4 deletions

View File

@@ -48,7 +48,12 @@ export const shareRouter = createTRPCRouter({
});
if (!share) {
throw TRPCNotFoundError('Share not found');
// Throw error if shareId is provided, otherwise return null
if ('shareId' in input) {
throw TRPCNotFoundError('Share not found');
}
return null;
}
return {