diff --git a/packages/server/src/middleware/authorized.ts b/packages/server/src/middleware/authorized.ts index ec8a3711cf..b23a9846b7 100644 --- a/packages/server/src/middleware/authorized.ts +++ b/packages/server/src/middleware/authorized.ts @@ -96,7 +96,7 @@ const authorized = } if (!ctx.user) { - return ctx.throw(403, "No user info found") + return ctx.throw(401, "No user info found") } // get the resource roles @@ -148,7 +148,7 @@ const authorized = // check authenticated if (!ctx.isAuthenticated) { - return ctx.throw(403, "Session not authenticated") + return ctx.throw(401, "Session not authenticated") } // check general builder stuff, this middleware is a good way