{"record":{"id":"a7673080afbeef4b","repo":"sickn33/agentic-awesome-skills","slug":"post-not-found","errorCode":null,"errorMessage":"Post not found","messagePattern":"Post not found","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"skills/graphql/SKILL.md","lineNumber":724,"sourceCode":"Directives are good for simple checks but can't handle complex\nbusiness logic. \"User can edit their own posts, or any post in\ngroups they moderate\" doesn't fit in a directive.\n\nRecommended fix:\n\n# AUTHORIZE IN RESOLVERS\n\n// Simple check in resolver\nMutation: {\n  deletePost: async (_, { id }, { user, db }) => {\n    if (!user) {\n      throw new AuthenticationError('Must be logged in');\n    }\n\n    const post = await db.post.findUnique({ where: { id } });\n\n    if (!post) {\n      throw new NotFoundError('Post not found');\n    }\n\n    // Business logic authorization\n    const canDelete =\n      post.authorId === user.id ||\n      user.role === 'ADMIN' ||\n      await userModeratesGroup(user.id, post.groupId);\n\n    if (!canDelete) {\n      throw new ForbiddenError('Cannot delete this post');\n    }\n\n    return db.post.delete({ where: { id } });\n  }\n}\n\n// Helper for field-level authorization\nUser: {","sourceCodeStart":706,"sourceCodeEnd":742,"githubUrl":"https://github.com/sickn33/agentic-awesome-skills/blob/58d857988fcfac6986206bca2b2fe223aa437e4b/skills/graphql/SKILL.md#L706-L742","documentation":"Error \"Post not found\" thrown in sickn33/agentic-awesome-skills.","triggerScenarios":"Thrown at skills/graphql/SKILL.md:724 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":"58d857988fcfac6986206bca2b2fe223aa437e4b","analyzedAt":"2026-08-26T11:55:59.350Z","schemaVersion":2},"datasetVersion":"2026-08-26T14:46:13.012Z"}