exceptions.py 247 B

123456789
  1. class AuthenticationFailed(Exception):
  2. status_code = 401
  3. detail = 'Incorrect authentication credentials.'
  4. def __init__(self, detail=None):
  5. self.detail = detail or self.detail
  6. def __str__(self):
  7. return self.detail