sickn33/agentic-awesome-skills · error · ForbiddenError
Cannot delete this post
Error message
Cannot delete this post
What it means
Error "Cannot delete this post" thrown in sickn33/agentic-awesome-skills.
Source
Thrown at skills/graphql/SKILL.md:734
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: {
email: (user, _, { currentUser }) => {
// Only show email to self or admin
if (currentUser?.id === user.id || currentUser?.role === 'ADMIN') {
return user.email;
}
return null;
}
}
### Authorization on queries but not on fieldsView on GitHub (pinned to 58d857988f)
When it happens
Trigger: Thrown at skills/graphql/SKILL.md:734 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/88c87411bb77accc.
Report an issue: GitHub.