fix: 500 on forbidden showing up in logs (#14636)
This commit is contained in:
1 parent
b9ac22d4ed
commit
0f8a0eaf4a
2 files changed
+21
-7
No files matched your search
@@ -56,8 +56,7 @@ export const eventOwnerProcedure = authedProcedure
|
||||
})();
|
||||
|
||||
if (!isAuthorized) {
|
||||
console.warn(`User ${ctx.user.id} attempted to an access an event ${event.id} they do not own.`);
|
||||
throw new TRPCError({ code: "UNAUTHORIZED" });
|
||||
throw new TRPCError({ code: "FORBIDDEN" });
|
||||
}
|
||||
|
||||
const isAllowed = (function () {
|
||||
|
||||
Reference in new issue
Block a user