{"record":{"id":"88c87411bb77accc","repo":"sickn33/agentic-awesome-skills","slug":"cannot-delete-this-post","errorCode":null,"errorMessage":"Cannot delete this post","messagePattern":"Cannot delete this post","errorType":"exception","errorClass":"ForbiddenError","httpStatus":403,"severity":"error","filePath":"skills/graphql/SKILL.md","lineNumber":734,"sourceCode":"  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: {\n  email: (user, _, { currentUser }) => {\n    // Only show email to self or admin\n    if (currentUser?.id === user.id || currentUser?.role === 'ADMIN') {\n      return user.email;\n    }\n    return null;\n  }\n}\n\n### Authorization on queries but not on fields","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/sickn33/agentic-awesome-skills/blob/58d857988fcfac6986206bca2b2fe223aa437e4b/skills/graphql/SKILL.md#L716-L752","documentation":"Error \"Cannot delete this post\" thrown in sickn33/agentic-awesome-skills.","triggerScenarios":"Thrown at skills/graphql/SKILL.md:734 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"}