{"record":{"id":"a528ff7efa51a819","repo":"diegosouzapw/OmniRoute","slug":"authz-unauthenticated","errorCode":"AUTHZ_UNAUTHENTICATED","errorMessage":"Authentication required","messagePattern":"Authentication required","errorType":"exception","errorClass":"AuthzAssertionError","httpStatus":401,"severity":"error","filePath":"src/server/authz/assertAuth.ts","lineNumber":84,"sourceCode":"    throw new AuthzAssertionError(\n      \"AUTHZ_NOT_INITIALIZED\",\n      \"Request did not pass through the authz middleware\",\n      500\n    );\n  }\n\n  if (actualClass !== expected) {\n    throw new AuthzAssertionError(\n      \"AUTHZ_ROUTE_CLASS_MISMATCH\",\n      `Expected ${expected} but got ${actualClass}`,\n      500\n    );\n  }\n\n  const subject = readSubjectFromHeaders(headers);\n\n  if (expected !== \"PUBLIC\" && subject.kind === \"anonymous\") {\n    throw new AuthzAssertionError(\"AUTHZ_UNAUTHENTICATED\", \"Authentication required\", 401);\n  }\n\n  return subject;\n}\n","sourceCodeStart":66,"sourceCodeEnd":89,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/server/authz/assertAuth.ts#L66-L89","documentation":"Error \"Authentication required\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/server/authz/assertAuth.ts:84 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}