diff --git a/docs/plugins/backend-plugin.md b/docs/plugins/backend-plugin.md index 46997f0101..384c6ca861 100644 --- a/docs/plugins/backend-plugin.md +++ b/docs/plugins/backend-plugin.md @@ -274,7 +274,7 @@ export async function createRouter( router.post('/me', async (request, response) => { if (!auth.isPrincipal(credentials, 'user')) { // Block requests that aren't from the user, this can include services or external callers. - response.status(401); + return response.status(401); } const credentials = await httpAuth.credentials(request) const userInfo = await userInfo.getUserInfo(credentials);