pdferror = 'An error occured during PDF generation please contact administrator' class Messages: unauthorized = 'User is Unauthorized' notauthenticated = 'User is not authenticated' tokenexipired = 'Token has expired' invalidtoken = 'Token is invalid' @staticmethod def not_found(resource: str) -> str: return f'{resource.capitalize()} not found' @staticmethod def invalid_input(resource: str, reason: str = "") -> str: return f'Invalid {resource} input {':' if reason else ""} {reason}' @staticmethod def not_allowed(resource: str, action: str) -> str: return f'User is not allowed to {action} this {resource}'