@@ -43,12 +43,10 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.api.signu
43
43
44
44
from typing import TYPE_CHECKING, Any
45
45
46
- from ..exceptions import raise_form_field_exception
47
- from supertokens_python.recipe.emailpassword.interfaces import (
48
- SignUpOkResult,
49
- SignUpPostEmailAlreadyExistsError,
50
- )
46
+ from supertokens_python.recipe.emailpassword.interfaces import SignUpPostOkResult
51
47
from supertokens_python.types import GeneralErrorResponse
48
+
49
+ from ..exceptions import raise_form_field_exception
52
50
from ..types import ErrorFormField
53
51
54
52
if TYPE_CHECKING:
@@ -79,20 +77,20 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.api.signu
79
77
form_fields, api_options, user_context
80
78
)
81
79
82
- if isinstance(response, SignUpOkResult ):
80
+ if isinstance(response, SignUpPostOkResult ):
83
81
return send_200_response(response.to_json(), api_options.response)
84
82
if isinstance(response, GeneralErrorResponse):
85
83
return send_200_response(response.to_json(), api_options.response)
86
- if isinstance(response, SignUpPostEmailAlreadyExistsError):
87
- return raise_form_field_exception(
88
- "EMAIL_ALREADY_EXISTS_ERROR",
89
- [
90
- ErrorFormField(
91
- id="email",
92
- error="This email already exists. Please sign in instead.",
93
- )
94
- ],
95
- )</ code > </ pre >
84
+
85
+ return raise_form_field_exception(
86
+ "EMAIL_ALREADY_EXISTS_ERROR",
87
+ [
88
+ ErrorFormField(
89
+ id="email",
90
+ error="This email already exists. Please sign in instead.",
91
+ )
92
+ ],
93
+ )</ code > </ pre >
96
94
</ details >
97
95
</ section >
98
96
< section >
@@ -127,20 +125,20 @@ <h2 class="section-title" id="header-functions">Functions</h2>
127
125
form_fields, api_options, user_context
128
126
)
129
127
130
- if isinstance(response, SignUpOkResult ):
128
+ if isinstance(response, SignUpPostOkResult ):
131
129
return send_200_response(response.to_json(), api_options.response)
132
130
if isinstance(response, GeneralErrorResponse):
133
131
return send_200_response(response.to_json(), api_options.response)
134
- if isinstance(response, SignUpPostEmailAlreadyExistsError):
135
- return raise_form_field_exception(
136
- "EMAIL_ALREADY_EXISTS_ERROR",
137
- [
138
- ErrorFormField(
139
- id="email",
140
- error="This email already exists. Please sign in instead.",
141
- )
142
- ],
143
- )</ code > </ pre >
132
+
133
+ return raise_form_field_exception(
134
+ "EMAIL_ALREADY_EXISTS_ERROR",
135
+ [
136
+ ErrorFormField(
137
+ id="email",
138
+ error="This email already exists. Please sign in instead.",
139
+ )
140
+ ],
141
+ )</ code > </ pre >
144
142
</ details >
145
143
</ dd >
146
144
</ dl >
0 commit comments