Expand description
Permission-category native errors.
This module defines category-native errors for permission concerns, focused on collision detection. Use these errors directly in handlers, services, and middleware.
§Overview
PermissionsError: category-native error enum for permission issues
§Examples
Detect a permission hash collision:
use axum_gate::permissions::PermissionsError;
use axum_gate::errors::UserFriendlyError;
let err = PermissionsError::collision(42, vec!["read:alpha".into(), "read:beta".into()]);
assert!(err.support_code().starts_with("PERM-COLLISION-"));
assert_eq!(err.severity(), axum_gate::errors::ErrorSeverity::Critical);Enums§
- Permissions
Error - Category-native permission errors.