mirror of https://github.com/langgenius/dify.git
fix: handle additional workspace limit error in forgot password flow
This commit is contained in:
parent
45c163d1fe
commit
39d7e64dcc
|
|
@ -24,7 +24,7 @@ from libs.password import hash_password, valid_password
|
|||
from models.account import Account
|
||||
from services.account_service import AccountService, TenantService
|
||||
from services.errors.account import AccountRegisterError
|
||||
from services.errors.workspace import WorkSpaceNotAllowedCreateError
|
||||
from services.errors.workspace import WorkSpaceNotAllowedCreateError, WorkspacesLimitExceededError
|
||||
from services.feature_service import FeatureService
|
||||
|
||||
|
||||
|
|
@ -171,6 +171,8 @@ class ForgotPasswordResetApi(Resource):
|
|||
)
|
||||
except WorkSpaceNotAllowedCreateError:
|
||||
pass
|
||||
except WorkspacesLimitExceededError:
|
||||
pass
|
||||
except AccountRegisterError:
|
||||
raise AccountInFreezeError()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue