Debian Codegraph @

allauth/core/exceptions.py

raw
1 from __future__ import annotations
2
3 from django.http import HttpResponse
4
5
6 class ImmediateHttpResponse(Exception):
7 """
8 This exception is used to interrupt the flow of processing to immediately
9 return a custom HttpResponse.
10 """
11
12 def __init__(self, response: HttpResponse) -> None:
13 self.response = response
14
15
16 class ReauthenticationRequired(Exception):
17 """
18 The action could not be performed because the user needs to
19 reauthenticate.
20 """
21
22 pass
23
24
25 class SignupClosedException(Exception):
26 """
27 Throws when attemtping to signup while signup is closed.
28 """
29
30 pass
31
32
33 class RateLimited(Exception):
34 pass