constants.py 821 B

123456789101112131415161718
  1. from enum import Enum
  2. class MESSAGES(str, Enum):
  3. DEFAULT = lambda msg="": f"{msg if msg else ''}"
  4. class ERROR_MESSAGES(str, Enum):
  5. DEFAULT = lambda err="": f"Something went wrong :/\n{err if err else ''}"
  6. INVALID_TOKEN = (
  7. "Your session has expired or the token is invalid. Please sign in again."
  8. )
  9. INVALID_CRED = "The email or password provided is incorrect. Please check for typos and try logging in again."
  10. UNAUTHORIZED = "401 Unauthorized"
  11. ACCESS_PROHIBITED = "You do not have permission to access this resource. Please contact your administrator for assistance."
  12. NOT_FOUND = "We could not find what you're looking for :/"
  13. USER_NOT_FOUND = "We could not find what you're looking for :/"
  14. MALICIOUS = "Unusual activities detected, please try again in a few minutes."