sickn33/agentic-awesome-skills · error · NotFoundError
Post not found
Error message
Post not found
What it means
Error "Post not found" thrown in sickn33/agentic-awesome-skills.
Source
Thrown at skills/graphql/SKILL.md:724
Directives are good for simple checks but can't handle complex
business logic. "User can edit their own posts, or any post in
groups they moderate" doesn't fit in a directive.
Recommended fix:
# AUTHORIZE IN RESOLVERS
// Simple check in resolver
Mutation: {
deletePost: async (_, { id }, { user, db }) => {
if (!user) {
throw new AuthenticationError('Must be logged in');
}
const post = await db.post.findUnique({ where: { id } });
if (!post) {
throw new NotFoundError('Post not found');
}
// Business logic authorization
const canDelete =
post.authorId === user.id ||
user.role === 'ADMIN' ||
await userModeratesGroup(user.id, post.groupId);
if (!canDelete) {
throw new ForbiddenError('Cannot delete this post');
}
return db.post.delete({ where: { id } });
}
}
// Helper for field-level authorization
User: {View on GitHub (pinned to 58d857988f)
When it happens
Trigger: Thrown at skills/graphql/SKILL.md:724 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sickn33/agentic-awesome-skills@58d857988f (2026-08-26).
Data as JSON: /api/errors/a7673080afbeef4b.
Report an issue: GitHub.