fix(app): add friendly not-found handling
This commit is contained in:
1 parent
c4d0f5219a
commit
ed21126eea
7 files changed
+203
-5
No files matched your search
@@ -710,7 +710,7 @@ export const get = query({
|
||||
handler: async (ctx, { jobId }) => {
|
||||
const ownerId = await getRequiredUserId(ctx);
|
||||
const job = await ctx.db.get(jobId);
|
||||
if (job?.ownerId !== ownerId) throw new ConvexError('Agent job not found.');
|
||||
if (job?.ownerId !== ownerId) return null;
|
||||
return job;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user